|
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 type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 |
|
11 <script> |
|
12 SimpleTest.waitForExplicitFinish(); |
|
13 |
|
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(); |
|
25 }; |
|
26 $('head').appendChild(x); |
|
27 } |
|
28 ); |
|
29 </script> |
|
30 |
|
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> |