Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / plain-text-line-breaks.html
blobe7b6b58a77fa34abd0238b21807e073060d1283a
1 <html>
2 <head>
3 <script>
4 function getText(id) {
5 var e = document.getElementById(id);
7 return e.contentDocument.getElementsByTagName('pre')[0].firstChild.nodeValue;
10 function runTests() {
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');
22 if (text != cr) {
23 result.innerHTML = "FAILED: cr document doesn't match text!"
24 return;
27 if (text != lf) {
28 result.innerHTML = "FAILED: lf document doesn't match text!"
29 return;
32 if (text != crlf) {
33 result.innerHTML = "FAILED: crlf document doesn't match text!"
34 return;
37 result.innerHTML = "SUCCESS"
39 </script>
40 </head>
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>
46 </body>
47 </html>