Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: LayoutTests/editing/selection/move-by-line-005.html

Issue 1212753002: Convert tests (except fast/, imported/) using ahem font to ahem.js style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <script src="../../resources/ahem.js"></script>
1 <p> 2 <p>
2 Test for <i><a href="rdar://problem/6967596">rdar://problem/6967596</a> 3 Test for <i><a href="rdar://problem/6967596">rdar://problem/6967596</a>
3 Safari hung using 100% CPU when I tried to look up a word in 4 Safari hung using 100% CPU when I tried to look up a word in
4 Dictionary using command-control-d</i>. 5 Dictionary using command-control-d</i>.
5 </p> 6 </p>
6 <p id="result">FAIL: Test did not run</p> 7 <p id="result">FAIL: Test did not run</p>
7 <div id="target" style="font: 20px Ahem; width: 320px; -webkit-user-modify: read -write;">Text and text<!-- --> more <!-- -->text</div> 8 <div id="target" style="font: 20px Ahem; width: 320px; -webkit-user-modify: read -write;">Text and text<!-- --> more <!-- -->text</div>
8 <script> 9 <script>
9 if ("testRunner" in window) 10 if ("testRunner" in window)
10 testRunner.dumpAsText(); 11 testRunner.dumpAsText();
11 12
12 var target = document.getElementById("target"); 13 var target = document.getElementById("target");
13 var selection = getSelection(); 14 var selection = getSelection();
14 15
15 selection.collapse(target.firstChild, 13); 16 selection.collapse(target.firstChild, 13);
16 selection.modify("move", "backward", "line"); 17 selection.modify("move", "backward", "line");
17 18
18 var pass = (selection.anchorNode === target.firstChild && selection.anchorOf fset === 0); 19 var pass = (selection.anchorNode === target.firstChild && selection.anchorOf fset === 0);
19 20
20 document.getElementById("result").innerText = pass ? "PASS" : "FAIL"; 21 document.getElementById("result").innerText = pass ? "PASS" : "FAIL";
21 </script> 22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698