5 var e
= document
.getElementById(id
);
7 return e
.contentDocument
.getElementsByTagName('pre')[0].firstChild
.nodeValue
;
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
14 var cr
= getText('cr');
15 var lf
= getText('lf');
16 var crlf
= getText('crlf');
18 var text
= "line 1\nline 2\nline 3\n";
20 var result
= document
.getElementById('result');
23 result
.innerHTML
= "FAILED: cr document doesn't match text!"
28 result
.innerHTML
= "FAILED: lf document doesn't match text!"
33 result
.innerHTML
= "FAILED: crlf document doesn't match text!"
37 result
.innerHTML
= "SUCCESS"
41 <body onload=
"runTests()">
42 <iframe id=
"cr" src=
"resources/line-breaks-cr.txt"></iframe>
43 <iframe id=
"lf" src=
"resources/line-breaks-lf.txt"></iframe>
44 <iframe id =
"crlf" src=
"resources/line-breaks-crlf.txt"></iframe>
45 <div id=
"result"></div>