| 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="../debugger-test.js"></script> | 4 <script src="../debugger-test.js"></script> |
| 5 <script src="../workspace-test.js"></script> | 5 <script src="../workspace-test.js"></script> |
| 6 <script src="../search/search-test.js"></script> | 6 <script src="../search/search-test.js"></script> |
| 7 <script src="../isolated-filesystem-test.js"></script> | 7 <script src="../isolated-filesystem-test.js"></script> |
| 8 <script src="./persistence-test.js"></script> | 8 <script src="./persistence-test.js"></script> |
| 9 <script src="./resources/foo.js"></script> | 9 <script src="./resources/foo.js"></script> |
| 10 <script> | 10 <script> |
| 11 | 11 |
| 12 function test() | 12 function test() |
| 13 { | 13 { |
| 14 var fs = new InspectorTest.TestFileSystem("file:///var/www"); | 14 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 15 var fsEntry = InspectorTest.addFooJSFile(fs); | 15 var fsEntry = InspectorTest.addFooJSFile(fs); |
| 16 var scope = new WebInspector.SourcesSearchScope(); | 16 var scope = new Sources.SourcesSearchScope(); |
| 17 fs.reportCreated(function() { }); | 17 fs.reportCreated(function() { }); |
| 18 | 18 |
| 19 InspectorTest.runTestSuite([ | 19 InspectorTest.runTestSuite([ |
| 20 function waitForUISourceCodes(next) | 20 function waitForUISourceCodes(next) |
| 21 { | 21 { |
| 22 Promise.all([ | 22 Promise.all([ |
| 23 InspectorTest.waitForUISourceCode("foo.js", WebInspector.project
Types.Network), | 23 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.Network), |
| 24 InspectorTest.waitForUISourceCode("foo.js", WebInspector.project
Types.FileSystem) | 24 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.FileSystem) |
| 25 ]).then(next); | 25 ]).then(next); |
| 26 }, | 26 }, |
| 27 | 27 |
| 28 dumpSearchResults, | 28 dumpSearchResults, |
| 29 | 29 |
| 30 function addFileMapping(next) | 30 function addFileMapping(next) |
| 31 { | 31 { |
| 32 WebInspector.fileSystemMapping.addFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); | 32 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); |
| 33 InspectorTest.waitForBinding("foo.js").then(next); | 33 InspectorTest.waitForBinding("foo.js").then(next); |
| 34 }, | 34 }, |
| 35 | 35 |
| 36 dumpSearchResults, | 36 dumpSearchResults, |
| 37 ]); | 37 ]); |
| 38 | 38 |
| 39 function dumpSearchResults(next) | 39 function dumpSearchResults(next) |
| 40 { | 40 { |
| 41 var searchConfig = new WebInspector.SearchConfig("window.foo f:foo", tru
e, false); | 41 var searchConfig = new Workspace.SearchConfig("window.foo f:foo", true,
false); |
| 42 InspectorTest.runSearchAndDumpResults(scope, searchConfig, true, next); | 42 InspectorTest.runSearchAndDumpResults(scope, searchConfig, true, next); |
| 43 } | 43 } |
| 44 | 44 |
| 45 InspectorFrontendHost.searchInPath = function(requestId, path, query) | 45 InspectorFrontendHost.searchInPath = function(requestId, path, query) |
| 46 { | 46 { |
| 47 setTimeout(reply); | 47 setTimeout(reply); |
| 48 | 48 |
| 49 function reply() | 49 function reply() |
| 50 { | 50 { |
| 51 var paths = ["/var/www" + fsEntry.fullPath]; | 51 var paths = ["/var/www" + fsEntry.fullPath]; |
| 52 WebInspector.isolatedFileSystemManager._onSearchCompleted({data: {re
questId: requestId, fileSystemPath: path, files: paths}}); | 52 Workspace.isolatedFileSystemManager._onSearchCompleted({data: {reque
stId: requestId, fileSystemPath: path, files: paths}}); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 }; | 55 }; |
| 56 </script> | 56 </script> |
| 57 </head> | 57 </head> |
| 58 <body onload="runTest()"> | 58 <body onload="runTest()"> |
| 59 <p>Verify that search across all files omits filesystem uiSourceCodes with bindi
ng to network.</p> | 59 <p>Verify that search across all files omits filesystem uiSourceCodes with bindi
ng to network.</p> |
| 60 </body> | 60 </body> |
| 61 </html> | 61 </html> |
| OLD | NEW |