content/html/document/test/test_bug765780.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=765780
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 765780</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    12     /** Test for Bug 765780 **/
    13     SimpleTest.waitForExplicitFinish();
    14     window.onload = function() {
    15       var f = $("f");
    16       var doc = f.contentDocument;
    17       doc.designMode = "on";
    18       var s = doc.createElement("script");
    19       s.textContent = "parent.called = true;";
    21       window.called = false;
    22       doc.body.appendChild(s);
    23       ok(called, "Script in designMode iframe should have run");
    25       doc = doc.querySelector("iframe").contentDocument;
    26       var s = doc.createElement("script");
    27       s.textContent = "parent.parent.called = true;";
    29       window.called = false;
    30       doc.body.appendChild(s);
    31       ok(called, "Script in designMode iframe's child should have run");
    33       SimpleTest.finish();
    34     }
    35   </script>
    36 </head>
    37 <body>
    38 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=765780">Mozilla Bug 765780</a>
    39 <!-- Important: iframe needs to not be display: none -->
    40 <p id="display"><iframe id="f" src="data:text/html,<iframe></iframe>"></iframe> </p>
    41 <div id="content" style="display: none">
    42 </div>
    43 <pre id="test">
    44 </pre>
    45 </body>
    46 </html>

mercurial