tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug379440.html (2009B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=379440
      5 -->
      6 <head>
      7  <title>Test for Bug 379440</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>        
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     10  <style type="text/css">
     11    #display > * { cursor: auto }
     12    #t1 {
     13      cursor: url(file:///tmp/foo), url(file:///c|/),
     14              url(http://example.com/), crosshair;
     15    }
     16    #t2 {
     17      cursor: url(file:///tmp/foo), url(file:///c|/), crosshair;
     18    }
     19    #t3 {
     20      cursor: url(http://example.com/), crosshair;
     21    }
     22    #t4 {
     23      cursor: url(http://example.com/);
     24    }
     25    #t5 {
     26      cursor: url(http://example.com/), no-such-cursor-exists;
     27    }
     28    #t6 {
     29      cursor: crosshair;
     30    }
     31    #t7 {
     32      cursor: no-such-cursor-exists;
     33    }
     34  </style>
     35 </head>
     36 <body>
     37 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=379440">Mozilla Bug 379440</a>
     38 <p id="display">
     39  <div id="t1"> </div>
     40  <div id="t2"></div>
     41  <div id="t3"></div>
     42  <div id="t4"></div>
     43  <div id="t5"></div>
     44  <div id="t6"></div>
     45  <div id="t7"></div>
     46 </p>
     47 <div id="content" style="display: none">
     48  
     49 </div>
     50 <pre id="test">
     51 <script class="testbody" type="text/javascript">
     52 
     53 /** Test for Bug 379440 */
     54 
     55 function cur(id) {
     56  return document.defaultView.getComputedStyle($(id)).cursor;
     57 }
     58 
     59 is(cur("t1"), 'url("file:///tmp/foo"), url("file:///c:/"), ' +
     60              'url("http://example.com/"), crosshair',
     61              "Serialize unloadable URLs using their specified value");
     62 is(cur("t2"), 'url("file:///tmp/foo"), url("file:///c:/"), crosshair',
     63              "Serialize unloadable URLs using their specified value");
     64 is(cur("t3"), 'url("http://example.com/"), crosshair', "URI + fallback");
     65 is(cur("t4"), "auto", "Must have a fallback");
     66 is(cur("t5"), "auto", "Fallback must be recognized");
     67 is(cur("t6"), "crosshair", "Just a fallback");
     68 is(cur("t7"), "auto", "Invalid fallback means ignore");
     69 
     70 </script>
     71 </pre>
     72 </body>
     73 </html>