4 <script src=../../resources/js-test.js
language=
"javascript" type=
"text/javascript"></script>
5 <title>Testing that searching for text restarts at the last active match.
</title>
9 Failure: If the second search ends up finding the text in this line we didn't restart the search from the last active match: last_step.
<br />
10 Start: The first search should match this word: first_step.
<br />
11 Success: The second search should match this word: last_step. Subsequent searches should fail.
13 <pre id=
"console" style=
"visibility: hidden;"></pre>
17 document
.getElementById("console").appendChild(document
.createTextNode(message
+ "\n"));
20 if (!window
.testRunner
)
21 testFailed('This test requires the testRunner object');
23 shouldBeTrue('testRunner.findString("first_", [])');
24 shouldBeTrue('testRunner.findString("first_step", ["StartInSelection"])');
25 shouldBeTrue('testRunner.findString("last_step", [])');
26 shouldBeFalse('testRunner.findString("last_step", [])');
27 shouldBeTrue('testRunner.findString("last_step", ["WrapAround"])');
30 document
.getElementById("console").style
.removeProperty("visibility");
32 var successfullyParsed
= true;