| <html> |
| <head> |
| <script src="../inspector-test.js"></script> |
| <script src="../debugger-test.js"></script> |
| <script src="../search/search-test.js"></script> |
| <script src="../isolated-filesystem-test.js"></script> |
| <script src="./persistence-test.js"></script> |
| <script src="./resources/foo.js"></script> |
| <script> |
| |
| function test() |
| { |
| var testMapping = InspectorTest.initializeTestMapping(); |
| var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| var fsEntry = InspectorTest.addFooJSFile(fs); |
| var scope = new Sources.SourcesSearchScope(); |
| fs.reportCreated(function() { }); |
| |
| InspectorTest.runTestSuite([ |
| function waitForUISourceCodes(next) |
| { |
| Promise.all([ |
| InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.Network), |
| InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.FileSystem) |
| ]).then(next); |
| }, |
| |
| dumpSearchResults, |
| |
| function addFileMapping(next) |
| { |
| testMapping.addBinding("foo.js"); |
| InspectorTest.waitForBinding("foo.js").then(next); |
| }, |
| |
| dumpSearchResults, |
| ]); |
| |
| function dumpSearchResults(next) |
| { |
| var searchConfig = new Workspace.SearchConfig("window.foo f:foo", true, false); |
| InspectorTest.runSearchAndDumpResults(scope, searchConfig, next); |
| } |
| |
| InspectorFrontendHost.searchInPath = function(requestId, path, query) |
| { |
| setTimeout(reply); |
| |
| function reply() |
| { |
| var paths = ["/var/www" + fsEntry.fullPath]; |
| Workspace.isolatedFileSystemManager._onSearchCompleted({data: {requestId: requestId, fileSystemPath: path, files: paths}}); |
| } |
| } |
| }; |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p>Verify that search across all files omits filesystem uiSourceCodes with binding to network.</p> |
| </body> |
| </html> |