content/base/test/test_bug455472.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=455472
     5 -->
     6 <head>
     7   <title>Test for Bug 455472</title>
     8   <script type="application/javascript" 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=455472">Mozilla Bug 455472</a>
    13 <p id="display"></p>
    14 <script>
    15   var ran = [ false, false, false, false, false ];
    16 </script>
    17 <div id="content" style="display: none">
    18   <iframe src="data:text/html,<script>parent.ran[0]=true</script>"></iframe>
    19   <object type="text/html" data="data:text/html,<script>parent.ran[1]=true</script>"></object>
    20   <embed type="image/svg+xml" src="data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20onload='parent.ran[2]=true'/>">
    21   <object type="text/html" data="data:application/octet-stream,<script>parent.ran[3]=true</script>"></object>
    22   <embed type="image/svg+xml" src="data:application/octet-stream,<svg%20xmlns='http://www.w3.org/2000/svg'%20onload='parent.ran[4]=true'/>">
    23 </div>
    24 <pre id="test">
    25 <script type="application/javascript">
    27 /** Test for Bug 455472 **/
    28 SimpleTest.waitForExplicitFinish();
    29 addLoadEvent(function() {
    30   var expected = [ true, true, true, false, false ];
    31   is (expected.length, ran.length, "Length mismatch");
    32   for (var i = 0; i < expected.length; ++i) {
    33     is(ran[i], expected[i],
    34        "Unexpected behavior in object " + i + " (0-based)");
    35   }
    36   SimpleTest.finish();
    37 });
    38 </script>
    39 </pre>
    40 </body>
    41 </html>

mercurial