content/base/test/test_bug606729.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:b7c86acabee0
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">
16
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>
51
52

mercurial