content/base/test/test_bug606729.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=606729
     5 -->
     6 <head>
     7   <title>Test for Bug 606729</title>
     8   <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
     9   <script type="text/javascript" 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=606729">Mozilla Bug 606729</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    17 </div>
    18 <pre id="test">
    19 <script>
    20   SimpleTest.waitForExplicitFinish();
    21   var events = 0;
    22   var expectedEvents = 2;
    23   function eventFired() {
    24     ++events;
    25     if (events == expectedEvents) {
    26       SimpleTest.finish();
    27     }
    28   }
    29 </script>
    30 <script
    31   src="data:"
    32   onerror="ok(true, 'Script with src=data: should fire onerror.');
    33            eventFired();"
    34   onload="ok(false, 'Script with src=data: should not fire onload.');
    35           eventFired();"
    36 >
    37 ok(false, "Script with src=data: should not run textContent.");
    38 </script>
    39 <script
    40   src="bogus:"
    41   onerror="ok(true, 'Script with src=bogus: should fire onerror.');
    42            eventFired();"
    43   onload="ok(false, 'Script with src=bogus: should not fire onload.');
    44           eventFired();"
    45 >
    46 ok(false, "Script with src=bogus: should not run textContent.");
    47 </script>
    48 </pre>
    49 </body>
    50 </html>

mercurial