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