OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 if (window.testRunner) { | 4 if (window.testRunner) { |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
7 } | 7 } |
8 | 8 |
9 function fail(s) { | 9 function fail(s) { |
10 document.body.innerHTML = "FAIL: " + s; | 10 document.body.innerHTML = "FAIL: " + s; |
(...skipping 20 matching lines...) Expand all Loading... |
31 if (!window.find('for', true, false, true)) fail('not found: for'); | 31 if (!window.find('for', true, false, true)) fail('not found: for'); |
32 // Wrap-around backwards. | 32 // Wrap-around backwards. |
33 if (!window.find('for', true, true, true)) fail('not found: for'); | 33 if (!window.find('for', true, true, true)) fail('not found: for'); |
34 if (!window.find('for', true, true, true)) fail('not found: for'); | 34 if (!window.find('for', true, true, true)) fail('not found: for'); |
35 // Case sensitivity, forwards. | 35 // Case sensitivity, forwards. |
36 if (!window.find('for', true, false, true)) fail('not found: for'); | 36 if (!window.find('for', true, false, true)) fail('not found: for'); |
37 if (!window.find('fOR', false, false, true)) fail('not found: for'); | 37 if (!window.find('fOR', false, false, true)) fail('not found: for'); |
38 if (!window.find('for', false, false, true)) fail('not found: for'); | 38 if (!window.find('for', false, false, true)) fail('not found: for'); |
39 if (!window.find('for', true, false, true)) fail('not found: for'); | 39 if (!window.find('for', true, false, true)) fail('not found: for'); |
40 if (window.find('FOR', true, false, true)) fail('found: FOR'); | 40 if (window.find('FOR', true, false, true)) fail('found: FOR'); |
| 41 // WholeWord. |
| 42 if (!window.find('for', false, false, true, true)) fail('whole word not found:
for'); |
| 43 if (!window.find('find', false, false, true, true)) fail('whole word not found
: find'); |
| 44 if (window.find('this', true, false, false, true)) fail('whole word found: thi
s'); |
| 45 if (window.find('est', false, false, false, true)) fail('whole word found: est
'); |
| 46 if (window.find('succ', false, false, false, true)) fail('whole word found: su
cc'); |
41 | 47 |
42 if (window.testRunner) | 48 if (window.testRunner) |
43 testRunner.notifyDone(); | 49 testRunner.notifyDone(); |
44 } | 50 } |
45 </script> | 51 </script> |
46 </head> | 52 </head> |
47 <body onload="runTest()"> | 53 <body onload="runTest()"> |
48 This is a test for window.find(). SUCCESS! | 54 This is a test for window.find(). SUCCESS! |
49 </body> | 55 </body> |
50 </html> | 56 </html> |
OLD | NEW |