| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> | 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> |
| 6 <script src="../../../http/tests/inspector/isolated-filesystem-test.js"></script
> | 6 <script src="../../../http/tests/inspector/isolated-filesystem-test.js"></script
> |
| 7 <script src="../../../http/tests/inspector/live-edit-test.js"></script> | 7 <script src="../../../http/tests/inspector/live-edit-test.js"></script> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 function test() | 10 function test() |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 persistence.dispose(); | 26 persistence.dispose(); |
| 27 persistence = new WebInspector.Persistence(InspectorTest.testWorkspace,
WebInspector.breakpointManager, WebInspector.fileSystemMapping); | 27 persistence = new WebInspector.Persistence(InspectorTest.testWorkspace,
WebInspector.breakpointManager, WebInspector.fileSystemMapping); |
| 28 } | 28 } |
| 29 | 29 |
| 30 function dumpFileSystemUISourceCodesMappings() | 30 function dumpFileSystemUISourceCodesMappings() |
| 31 { | 31 { |
| 32 var uiSourceCodes = InspectorTest.testWorkspace.project(fileSystemProjec
tId).uiSourceCodes(); | 32 var uiSourceCodes = InspectorTest.testWorkspace.project(fileSystemProjec
tId).uiSourceCodes(); |
| 33 InspectorTest.addResult("UISourceCode uri to url mappings:"); | 33 InspectorTest.addResult("UISourceCode uri to url mappings:"); |
| 34 for (var uiSourceCode of uiSourceCodes) { | 34 for (var uiSourceCode of uiSourceCodes) { |
| 35 var binding = persistence.binding(uiSourceCode); | 35 var binding = persistence.binding(uiSourceCode); |
| 36 var networkURL = binding ? binding.network.url() : ""; | 36 var url = binding ? binding.network.url() : ""; |
| 37 InspectorTest.addResult(" " + uiSourceCode.url() + " -> " + netwo
rkURL); | 37 InspectorTest.addResult(" " + uiSourceCode.url() + " -> " + url); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 InspectorTest.runTestSuite([ | 41 InspectorTest.runTestSuite([ |
| 42 function testAutomaticMapping(next) | 42 function testAutomaticMapping(next) |
| 43 { | 43 { |
| 44 createWorkspaceWithTarget(); | 44 createWorkspaceWithTarget(); |
| 45 | 45 |
| 46 InspectorTest.addResult("Adding file system."); | 46 InspectorTest.addResult("Adding file system."); |
| 47 var fs = new InspectorTest.TestFileSystem("file:///var/www"); | 47 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 createWorkspaceWithTarget(); | 87 createWorkspaceWithTarget(); |
| 88 fs.reportCreated(fileSystemCreated3); | 88 fs.reportCreated(fileSystemCreated3); |
| 89 } | 89 } |
| 90 | 90 |
| 91 function fileSystemCreated3() | 91 function fileSystemCreated3() |
| 92 { | 92 { |
| 93 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht
ml/foo.js", WebInspector.resourceTypes.Script, "<foo content>", target); | 93 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht
ml/foo.js", WebInspector.resourceTypes.Script, "<foo content>", target); |
| 94 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba
r.js", WebInspector.resourceTypes.Script, "<foo content>", target); | 94 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba
r.js", WebInspector.resourceTypes.Script, "<foo content>", target); |
| 95 dumpFileSystemUISourceCodesMappings(); | 95 dumpFileSystemUISourceCodesMappings(); |
| 96 | 96 |
| 97 var networkURL = InspectorTest.testNetworkMapping.networkURL(net
workUISourceCode); | 97 WebInspector.fileSystemMapping.removeMappingForURL(networkUISour
ceCode.url()); |
| 98 WebInspector.fileSystemMapping.removeMappingForURL(networkURL); | |
| 99 fs.reportRemoved(); | 98 fs.reportRemoved(); |
| 100 next(); | 99 next(); |
| 101 } | 100 } |
| 102 }, | 101 }, |
| 103 | 102 |
| 104 function testRemoveProject(next) | 103 function testRemoveProject(next) |
| 105 { | 104 { |
| 106 function dumpWorkspaceUISourceCodes() | 105 function dumpWorkspaceUISourceCodes() |
| 107 { | 106 { |
| 108 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); | 107 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 156 } |
| 158 } | 157 } |
| 159 ]); | 158 ]); |
| 160 }; | 159 }; |
| 161 </script> | 160 </script> |
| 162 </head> | 161 </head> |
| 163 <body onload="runTest()"> | 162 <body onload="runTest()"> |
| 164 <p>Tests file system project mappings.</p> | 163 <p>Tests file system project mappings.</p> |
| 165 </body> | 164 </body> |
| 166 </html> | 165 </html> |
| OLD | NEW |