Bug 1686668 [wpt PR 27185] - Update wpt metadata, a=testonly
[gecko.git] / dom / base / test / test_bug371576-5.html
blob842fa9e3c3e2bfe1f5e7374b3abfa010ac9d695b
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=371576
5 -->
6 <head id="head">
7 <title>Test for Bug 371576</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 <script>
12 SimpleTest.waitForExplicitFinish();
14 addLoadEvent(
15 function doe(){
16 var x=document.createElement('script');
17 x.src='data:text/html,var scr=document.createElement("script");\
18 scr.innerHTML = "function doe3(){$(\'display\').innerHTML = \'You should see this text\';}";\
19 $("head").appendChild(scr);';
20 x.onload= function (){
21 doe3();
22 ok(true,"function doe3 is defined, and the body content has been replaced.");
23 is($("display").textContent, "You should see this text", "text set properly");
24 SimpleTest.finish();
26 $('head').appendChild(x);
29 </script>
31 </head>
32 <body>
33 <p id="display">You shouldn't see this</p>
34 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=371576">Mozilla Bug 371576</a>
35 </body>
36 </html>