Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / selection-hard-linebreak.html
blobe0a7bcc569dc0cf28b8de06aa68a2d4e67a885f9
1 <head>
2 <script>
3 function test()
5 addTest(2, 3);
6 addTest(2, 4);
7 addTest(2, 5);
8 addTest(2, 6);
9 addTest(3, 4);
10 addTest(3, 5);
11 addTest(3, 6);
12 addTest(4, 5);
13 addTest(4, 6);
14 addTest(5, 6);
17 function addTest(i, j)
19 var iframe = document.createElement("iframe");
20 document.body.appendChild(iframe);
21 var doc = iframe.contentDocument;
22 var pre = doc.createElement("pre");
23 var text = doc.createTextNode("foo\n\nbar");
24 pre.appendChild(text);
25 pre.style.margin = "0";
26 doc.body.appendChild(pre);
27 var sel = doc.defaultView.getSelection();
28 sel.setBaseAndExtent(text, i, text, j);
30 </script>
31 <style>
32 iframe { border: 1px solid blue; width: 60px; height: 70px; margin: 4px; }
33 </style>
34 </head>
35 <body>
36 <p>
37 Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=13153">http://bugs.webkit.org/show_bug.cgi?id=13153</a>
38 REGRESSION: Visual highlighting of pre-populated blank line in textarea is broken</i>.
39 </p>
40 <p>
41 Testing the highlighting of and near hard line breaks.
42 </p>
43 <script>
44 test();
45 </script>
46 <p>
47 Testing the highlighting of text split across boxes.
48 </p>
49 <iframe style="width: 128px;" src="data:text/html,
50 <div id='target'>Lorem ipsum dolor</div>
51 <script>
52 var text = document.getElementById('target').firstChild;
53 getSelection().setBaseAndExtent(text, 13, text, 16);
54 </script>
56 </iframe>
57 </body>