| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../resources-test.js"></script> | 4 <script src="../resources-test.js"></script> |
| 5 <script src="search-test.js"></script> | 5 <script src="search-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 InspectorTest.runAfterResourcesAreFinished(["search.js"], step2); | 9 InspectorTest.runAfterResourcesAreFinished(["search.js"], step2); |
| 10 var resource; | 10 var resource; |
| 11 var staticContentProvider; | 11 var staticContentProvider; |
| 12 | 12 |
| 13 function step2() | 13 function step2() |
| 14 { | 14 { |
| 15 resource = WebInspector.resourceForURL("http://127.0.0.1:8000/inspector/
search/resources/search.js"); | 15 resource = Bindings.resourceForURL("http://127.0.0.1:8000/inspector/sear
ch/resources/search.js"); |
| 16 resource.requestContent().then(step3); | 16 resource.requestContent().then(step3); |
| 17 } | 17 } |
| 18 | 18 |
| 19 function step3() | 19 function step3() |
| 20 { | 20 { |
| 21 staticContentProvider = WebInspector.StaticContentProvider.fromString(""
, WebInspector.resourceTypes.Script, resource.content); | 21 staticContentProvider = Common.StaticContentProvider.fromString("", Comm
on.resourceTypes.Script, resource.content); |
| 22 InspectorTest.addResult(resource.url); | 22 InspectorTest.addResult(resource.url); |
| 23 | 23 |
| 24 var text = "searchTestUniqueString"; | 24 var text = "searchTestUniqueString"; |
| 25 staticContentProvider.searchInContent(text, true, false, step4); | 25 staticContentProvider.searchInContent(text, true, false, step4); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function step4(searchMatches) | 28 function step4(searchMatches) |
| 29 { | 29 { |
| 30 InspectorTest.dumpSearchMatches(searchMatches); | 30 InspectorTest.dumpSearchMatches(searchMatches); |
| 31 | 31 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 58 } | 58 } |
| 59 </script> | 59 </script> |
| 60 </head> | 60 </head> |
| 61 <body> | 61 <body> |
| 62 <p>Tests static content provider search.</p> | 62 <p>Tests static content provider search.</p> |
| 63 <a href="https://bugs.webkit.org/show_bug.cgi?id=70354">Bug 70354</a> | 63 <a href="https://bugs.webkit.org/show_bug.cgi?id=70354">Bug 70354</a> |
| 64 | 64 |
| 65 <iframe src="resources/search.html" onload="runTest()"> | 65 <iframe src="resources/search.html" onload="runTest()"> |
| 66 </body> | 66 </body> |
| 67 </html> | 67 </html> |
| OLD | NEW |