| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Test search in sources.</title> | 3 <title>Test search in sources.</title> |
| 4 <script src="../inspector-test.js"></script> | 4 <script src="../inspector-test.js"></script> |
| 5 <script src="../isolated-filesystem-test.js"></script> | 5 <script src="../isolated-filesystem-test.js"></script> |
| 6 <script src="../workspace-test.js"></script> | 6 <script src="../workspace-test.js"></script> |
| 7 <script> | 7 <script> |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 var fileSystemPath = "/var/www"; | 10 var fileSystemPath = "/var/www"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 WebInspector.inspectorView.showPanel("sources"); | 41 WebInspector.inspectorView.showPanel("sources"); |
| 42 WebInspector.inspectorView.showViewInDrawer("search"); | 42 WebInspector.inspectorView.showViewInDrawer("search"); |
| 43 | 43 |
| 44 InspectorTest.createWorkspace(); | 44 InspectorTest.createWorkspace(); |
| 45 manager = InspectorTest.createIsolatedFileSystemManager(InspectorTest.testWo
rkspace, InspectorTest.testFileSystemMapping); | 45 manager = InspectorTest.createIsolatedFileSystemManager(InspectorTest.testWo
rkspace, InspectorTest.testFileSystemMapping); |
| 46 manager.addMockFileSystem(fileSystemPath); | 46 manager.addMockFileSystem(fileSystemPath); |
| 47 InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(function(){}, 3); | 47 InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(function(){}, 3); |
| 48 manager.addFiles(fileSystemPath, files); | 48 manager.addFiles(fileSystemPath, files); |
| 49 | 49 |
| 50 var scope = new WebInspector.SourcesSearchScope(); | 50 var scope = new WebInspector.SourcesSearchScope(); |
| 51 scope._workspace = InspectorTest.testWorkspace; | 51 WebInspector.workspace = InspectorTest.testWorkspace; |
| 52 | 52 |
| 53 function runSearchAndDumpResults(searchConfig, callback) | 53 function runSearchAndDumpResults(searchConfig, callback) |
| 54 { | 54 { |
| 55 var searchResults = []; | 55 var searchResults = []; |
| 56 var progress = new WebInspector.Progress(); | 56 var progress = new WebInspector.Progress(); |
| 57 scope.performSearch(searchConfig, progress, searchResultCallback, search
FinishedCallback); | 57 scope.performSearch(searchConfig, progress, searchResultCallback, search
FinishedCallback); |
| 58 | 58 |
| 59 function searchResultCallback(searchResult) | 59 function searchResultCallback(searchResult) |
| 60 { | 60 { |
| 61 searchResults.push(searchResult); | 61 searchResults.push(searchResult); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 211 } |
| 212 | 212 |
| 213 </script> | 213 </script> |
| 214 </head> | 214 </head> |
| 215 <body onload="runTest()"> | 215 <body onload="runTest()"> |
| 216 <iframe src="resources/search.html"> | 216 <iframe src="resources/search.html"> |
| 217 <p>Tests that ScriptSearchScope performs search across all sources correctly.</p
> | 217 <p>Tests that ScriptSearchScope performs search across all sources correctly.</p
> |
| 218 See <a href="https://bugs.webkit.org/show_bug.cgi?id=41350">bug 41350</a>. | 218 See <a href="https://bugs.webkit.org/show_bug.cgi?id=41350">bug 41350</a>. |
| 219 </body> | 219 </body> |
| 220 </html> | 220 </html> |
| OLD | NEW |