OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../debugger-test.js"></script> |
| 5 <script src="../workspace-test.js"></script> |
| 6 <script src="../search/search-test.js"></script> |
| 7 <script src="../isolated-filesystem-test.js"></script> |
| 8 <script src="./persistence-test.js"></script> |
| 9 <script src="./resources/foo.js"></script> |
| 10 <script> |
| 11 |
| 12 function test() |
| 13 { |
| 14 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 15 var fsEntry = fs.root.mkdir("inspector").mkdir("persistence").mkdir("resourc
es").addFile("foo.js", "window.foo = ()=>'foo';"); |
| 16 fs.reportCreated(function() { }); |
| 17 InspectorTest.waitForBinding("foo.js", onBindingCreated); |
| 18 WebInspector.fileSystemMapping.addFileSystem(fs.fileSystemPath); |
| 19 WebInspector.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http://127
.0.0.1:8000", "/"); |
| 20 |
| 21 function onBindingCreated() |
| 22 { |
| 23 InspectorTest.addResult("BindingCreated"); |
| 24 var scope = new WebInspector.SourcesSearchScope(); |
| 25 var searchConfig = new WebInspector.SearchConfig("window f:foo", true, f
alse); |
| 26 InspectorTest.runSearchAndDumpResults(scope, searchConfig, true, Inspect
orTest.completeTest); |
| 27 } |
| 28 |
| 29 InspectorFrontendHost.searchInPath = function(requestId, path, query) |
| 30 { |
| 31 setTimeout(reply); |
| 32 |
| 33 function reply() |
| 34 { |
| 35 var paths = ["/var/www" + fsEntry.fullPath]; |
| 36 WebInspector.isolatedFileSystemManager._onSearchCompleted({data: {re
questId: requestId, fileSystemPath: path, files: paths}}); |
| 37 } |
| 38 } |
| 39 }; |
| 40 </script> |
| 41 </head> |
| 42 <body onload="runTest()"> |
| 43 <p>Verify that search across all files filters out matches in uiSourceCodes with
persistent binding.</p> |
| 44 </body> |
| 45 </html> |
OLD | NEW |