tor-browser

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

test_bug789856.html (1041B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=789856
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 789856</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789856">Mozilla Bug 789856</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16  
     17 </div>
     18 <pre id="test">
     19 <script type="application/javascript">
     20 
     21 /** Test for Bug 789856 */
     22 SimpleTest.waitForExplicitFinish();
     23 
     24 var script = document.createElement("script");
     25 script.onload = function() {
     26  ok(false, "This script should not load");
     27  SimpleTest.finish();
     28 }
     29 script.onerror = function() {
     30  ok(true, "This script should fail to load");
     31  SimpleTest.finish();
     32 }
     33 // If neither one fires,  the test fails, as it should
     34 
     35 // Use a URL the test is not allowed to load
     36 script.src = "file:///tmp/"
     37 document.body.appendChild(script);
     38 
     39 </script>
     40 </pre>
     41 </body>
     42 </html>