test_bug606729.html (1283B)
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 src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=606729">Mozilla Bug 606729</a> 13 <p id="display"></p> 14 <div id="content" style="display: none"> 15 16 </div> 17 <pre id="test"> 18 <script> 19 SimpleTest.waitForExplicitFinish(); 20 var events = 0; 21 var expectedEvents = 2; 22 function eventFired() { 23 ++events; 24 if (events == expectedEvents) { 25 SimpleTest.finish(); 26 } 27 } 28 </script> 29 <script 30 src="data:" 31 onerror="ok(true, 'Script with src=data: should fire onerror.'); 32 eventFired();" 33 onload="ok(false, 'Script with src=data: should not fire onload.'); 34 eventFired();" 35 > 36 ok(false, "Script with src=data: should not run textContent."); 37 </script> 38 <script 39 src="bogus:" 40 onerror="ok(true, 'Script with src=bogus: should fire onerror.'); 41 eventFired();" 42 onload="ok(false, 'Script with src=bogus: should not fire onload.'); 43 eventFired();" 44 > 45 ok(false, "Script with src=bogus: should not run textContent."); 46 </script> 47 </pre> 48 </body> 49 </html>