4 https://bugzilla.mozilla.org/show_bug.cgi?id=340800
7 <title>Test for Bug
340800</title>
8 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=340800">Mozilla Bug
340800</a>
15 <div id=
"content" style=
"display: none">
16 <h1>iframe text/plain as DOM test
</h1>
20 <iframe name=
"iframe1" width=
"100%" height=
"200"
21 src=
"/static/bug340800_iframe.txt"></iframe>
25 <h2>textarea with iframe content
</h2>
26 <textarea rows=
"10" cols=
"80" id=
"textarea1"></textarea>
30 <h2>div with white-space: pre and iframe content
</h2>
35 <script class=
"testbody" type=
"text/javascript">
37 /** Test for Bug
340800 **/
38 function populateIframes () {
39 var iframe, iframeBody;
40 if ((iframe = window.frames.iframe1) && (iframeBody = iframe.document.body)) {
41 $('div1').innerHTML = iframeBody.innerHTML;
42 $('textarea1').value = iframeBody.innerHTML;
44 is($('div1').firstChild.tagName,
"PRE",
"innerHTML from txt iframe works with div");
45 ok($('textarea1').value.indexOf(
"<pre>")
> -
1,
"innerHTML from txt iframe works with textarea.value");
49 addLoadEvent(populateIframes);
50 SimpleTest.waitForExplicitFinish();