1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug455472.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=455472 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 455472</title> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=455472">Mozilla Bug 455472</a> 1.16 +<p id="display"></p> 1.17 +<script> 1.18 + var ran = [ false, false, false, false, false ]; 1.19 +</script> 1.20 +<div id="content" style="display: none"> 1.21 + <iframe src="data:text/html,<script>parent.ran[0]=true</script>"></iframe> 1.22 + <object type="text/html" data="data:text/html,<script>parent.ran[1]=true</script>"></object> 1.23 + <embed type="image/svg+xml" src="data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20onload='parent.ran[2]=true'/>"> 1.24 + <object type="text/html" data="data:application/octet-stream,<script>parent.ran[3]=true</script>"></object> 1.25 + <embed type="image/svg+xml" src="data:application/octet-stream,<svg%20xmlns='http://www.w3.org/2000/svg'%20onload='parent.ran[4]=true'/>"> 1.26 +</div> 1.27 +<pre id="test"> 1.28 +<script type="application/javascript"> 1.29 + 1.30 +/** Test for Bug 455472 **/ 1.31 +SimpleTest.waitForExplicitFinish(); 1.32 +addLoadEvent(function() { 1.33 + var expected = [ true, true, true, false, false ]; 1.34 + is (expected.length, ran.length, "Length mismatch"); 1.35 + for (var i = 0; i < expected.length; ++i) { 1.36 + is(ran[i], expected[i], 1.37 + "Unexpected behavior in object " + i + " (0-based)"); 1.38 + } 1.39 + SimpleTest.finish(); 1.40 +}); 1.41 +</script> 1.42 +</pre> 1.43 +</body> 1.44 +</html>