Index: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-search-across-all-files.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-search-across-all-files.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-search-across-all-files.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4e29651b8f64d35a952ad2d727ab9914ef1ff9a5 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-search-across-all-files.html |
@@ -0,0 +1,61 @@ |
+<html> |
+<head> |
+<script src="../inspector-test.js"></script> |
+<script src="../debugger-test.js"></script> |
+<script src="../workspace-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 fs = new InspectorTest.TestFileSystem("file:///var/www"); |
+ var fsEntry = InspectorTest.addFooJSFile(fs); |
+ var scope = new WebInspector.SourcesSearchScope(); |
+ fs.reportCreated(function() { }); |
+ |
+ InspectorTest.runTestSuite([ |
+ function waitForUISourceCodes(next) |
+ { |
+ Promise.all([ |
+ InspectorTest.waitForUISourceCode("foo.js", WebInspector.projectTypes.Network), |
+ InspectorTest.waitForUISourceCode("foo.js", WebInspector.projectTypes.FileSystem) |
+ ]).then(next); |
+ }, |
+ |
+ dumpSearchResults, |
+ |
+ function addFileMapping(next) |
+ { |
+ WebInspector.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http://127.0.0.1:8000", "/"); |
+ InspectorTest.waitForBinding("foo.js").then(next); |
+ }, |
+ |
+ dumpSearchResults, |
+ ]); |
+ |
+ function dumpSearchResults(next) |
+ { |
+ var searchConfig = new WebInspector.SearchConfig("window.foo f:foo", true, false); |
+ InspectorTest.runSearchAndDumpResults(scope, searchConfig, true, next); |
+ } |
+ |
+ InspectorFrontendHost.searchInPath = function(requestId, path, query) |
+ { |
+ setTimeout(reply); |
+ |
+ function reply() |
+ { |
+ var paths = ["/var/www" + fsEntry.fullPath]; |
+ WebInspector.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> |