content/base/test/test_bug606729.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug606729.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=606729
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 606729</title>
    1.11 +  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
    1.12 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.14 +</head>
    1.15 +<body>
    1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=606729">Mozilla Bug 606729</a>
    1.17 +<p id="display"></p>
    1.18 +<div id="content" style="display: none">
    1.19 +  
    1.20 +</div>
    1.21 +<pre id="test">
    1.22 +<script>
    1.23 +  SimpleTest.waitForExplicitFinish();
    1.24 +  var events = 0;
    1.25 +  var expectedEvents = 2;
    1.26 +  function eventFired() {
    1.27 +    ++events;
    1.28 +    if (events == expectedEvents) {
    1.29 +      SimpleTest.finish();
    1.30 +    }
    1.31 +  }
    1.32 +</script>
    1.33 +<script
    1.34 +  src="data:"
    1.35 +  onerror="ok(true, 'Script with src=data: should fire onerror.');
    1.36 +           eventFired();"
    1.37 +  onload="ok(false, 'Script with src=data: should not fire onload.');
    1.38 +          eventFired();"
    1.39 +>
    1.40 +ok(false, "Script with src=data: should not run textContent.");
    1.41 +</script>
    1.42 +<script
    1.43 +  src="bogus:"
    1.44 +  onerror="ok(true, 'Script with src=bogus: should fire onerror.');
    1.45 +           eventFired();"
    1.46 +  onload="ok(false, 'Script with src=bogus: should not fire onload.');
    1.47 +          eventFired();"
    1.48 +>
    1.49 +ok(false, "Script with src=bogus: should not run textContent.");
    1.50 +</script>
    1.51 +</pre>
    1.52 +</body>
    1.53 +</html>
    1.54 +
    1.55 +

mercurial