| 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="../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 fs = new InspectorTest.TestFileSystem("file:///var/www"); | 13 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 14 InspectorTest.addFooJSFile(fs); | 14 InspectorTest.addFooJSFile(fs); |
| 15 fs.reportCreated(function() { }); | 15 fs.reportCreated(function() { }); |
| 16 | 16 |
| 17 InspectorTest.runTestSuite([ | 17 InspectorTest.runTestSuite([ |
| 18 function waitForUISourceCodes(next) | 18 function waitForUISourceCodes(next) |
| 19 { | 19 { |
| 20 Promise.all([ | 20 Promise.all([ |
| 21 InspectorTest.waitForUISourceCode("foo.js", WebInspector.project
Types.Network), | 21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.Network), |
| 22 InspectorTest.waitForUISourceCode("foo.js", WebInspector.project
Types.FileSystem) | 22 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.FileSystem) |
| 23 ]).then(next); | 23 ]).then(next); |
| 24 }, | 24 }, |
| 25 | 25 |
| 26 function goToSourceDialogBeforeBinding(next) | 26 function goToSourceDialogBeforeBinding(next) |
| 27 { | 27 { |
| 28 dumpGoToSourceDialog(); | 28 dumpGoToSourceDialog(); |
| 29 next(); | 29 next(); |
| 30 }, | 30 }, |
| 31 | 31 |
| 32 function addFileSystemMapping(next) | 32 function addFileSystemMapping(next) |
| 33 { | 33 { |
| 34 WebInspector.fileSystemMapping.addFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); | 34 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); |
| 35 InspectorTest.waitForBinding("foo.js").then(next); | 35 InspectorTest.waitForBinding("foo.js").then(next); |
| 36 }, | 36 }, |
| 37 | 37 |
| 38 function goToSourceAfterBinding(next) | 38 function goToSourceAfterBinding(next) |
| 39 { | 39 { |
| 40 dumpGoToSourceDialog(); | 40 dumpGoToSourceDialog(); |
| 41 next(); | 41 next(); |
| 42 }, | 42 }, |
| 43 ]); | 43 ]); |
| 44 | 44 |
| 45 function dumpGoToSourceDialog() | 45 function dumpGoToSourceDialog() |
| 46 { | 46 { |
| 47 WebInspector.panels.sources._sourcesView.showOpenResourceDialog(); | 47 UI.panels.sources._sourcesView.showOpenResourceDialog(); |
| 48 var dialog = WebInspector.OpenResourceDialog._instanceForTest; | 48 var dialog = Sources.OpenResourceDialog._instanceForTest; |
| 49 var keys = []; | 49 var keys = []; |
| 50 for (var i = 0; i < dialog.itemCount(); ++i) | 50 for (var i = 0; i < dialog.itemCount(); ++i) |
| 51 keys.push(dialog.itemKeyAt(i)); | 51 keys.push(dialog.itemKeyAt(i)); |
| 52 keys.sort(); | 52 keys.sort(); |
| 53 InspectorTest.addResult(keys.join("\n")); | 53 InspectorTest.addResult(keys.join("\n")); |
| 54 WebInspector.Dialog._instance.detach(); | 54 UI.Dialog._instance.detach(); |
| 55 } | 55 } |
| 56 }; | 56 }; |
| 57 </script> | 57 </script> |
| 58 </head> | 58 </head> |
| 59 <body onload="runTest()"> | 59 <body onload="runTest()"> |
| 60 <p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p> | 60 <p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p> |
| 61 </body> | 61 </body> |
| 62 </html> | 62 </html> |
| OLD | NEW |