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

Side by Side Diff: LayoutTests/editing/text-iterator/findString-restarts-at-last-position.html

Issue 26654011: Fixing TestRunner::findString() so as to fix findString.html editing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing default initializations Created 7 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" href="../../fast/js/resources/js-test-style.css"> 4 <link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
5 <script src=../../fast/js/resources/js-test-pre.js language="javascript" type="t ext/javascript"></script> 5 <script src=../../fast/js/resources/js-test-pre.js language="javascript" type="t ext/javascript"></script>
6 <title>Testing that searching for text restarts at the last active match.</title > 6 <title>Testing that searching for text restarts at the last active match.</title >
7 </head> 7 </head>
8 <body> 8 <body>
9 <div id="container"> 9 <div id="container">
10 Failure: If the second search ends up finding the text in this line we d idn't restart the search from the last active match: last_step.<br /> 10 Failure: If the second search ends up finding the text in this line we d idn't restart the search from the last active match: last_step.<br />
11 Start: The first search should match this word: first_step.<br /> 11 Start: The first search should match this word: first_step.<br />
12 Success: The second search should match this word: last_step. Subsequent searches should fail. 12 Success: The second search should match this word: last_step. Subsequent searches should fail.
13 </div> 13 </div>
14 <pre id="console" style="visibility: hidden;"></pre> 14 <pre id="console" style="visibility: hidden;"></pre>
15 <script> 15 <script>
16 function log(message) 16 function log(message)
17 { 17 {
18 document.getElementById("console").appendChild(document.createTextNode(messa ge + "\n")); 18 document.getElementById("console").appendChild(document.createTextNode(messa ge + "\n"));
19 } 19 }
20 20
21 if (!window.testRunner) 21 if (!window.testRunner)
22 testFailed('This test requires the testRunner object'); 22 testFailed('This test requires the testRunner object');
23 else { 23 else {
24 shouldBeTrue('testRunner.findString("first_", [])'); 24 shouldBeTrue('testRunner.findString("first_", [])');
25 shouldBeTrue('testRunner.findString("first_step", [])'); 25 shouldBeTrue('testRunner.findString("first_step", ["StartInSelection"])');
26 shouldBeTrue('testRunner.findString("last_step", [])'); 26 shouldBeTrue('testRunner.findString("last_step", [])');
27 shouldBeFalse('testRunner.findString("last_step", [])'); 27 shouldBeFalse('testRunner.findString("last_step", [])');
28 shouldBeTrue('testRunner.findString("last_step", ["WrapAround"])');
28 } 29 }
29 30
30 document.getElementById("console").style.removeProperty("visibility"); 31 document.getElementById("console").style.removeProperty("visibility");
31 32
32 var successfullyParsed = true; 33 var successfullyParsed = true;
33 </script> 34 </script>
34 <script src="../../fast/js/resources/js-test-post.js"></script> 35 <script src="../../fast/js/resources/js-test-post.js"></script>
35 </body> 36 </body>
36 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698