| 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> | 7 <script> |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 function dumpUISourceCodes(uiSourceCodes, next) | 10 function dumpUISourceCodes(uiSourceCodes, next) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 fs.root.mkdir("html2").addFile("foo.js", ""); | 50 fs.root.mkdir("html2").addFile("foo.js", ""); |
| 51 fs.reportCreated(callback.bind(null, fs)); | 51 fs.reportCreated(callback.bind(null, fs)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 InspectorTest.runTestSuite([ | 54 InspectorTest.runTestSuite([ |
| 55 function testFileSystems(next) | 55 function testFileSystems(next) |
| 56 { | 56 { |
| 57 InspectorTest.addResult("Adding first file system."); | 57 InspectorTest.addResult("Adding first file system."); |
| 58 var fs1 = new InspectorTest.TestFileSystem("file:///var/www"); | 58 var fs1 = new InspectorTest.TestFileSystem("file:///var/www"); |
| 59 var fs2 = new InspectorTest.TestFileSystem("file:///foo/bar"); | 59 var fs2 = new InspectorTest.TestFileSystem("file:///foo/bar"); |
| 60 WebInspector.fileSystemMapping.addFileSystem(fs1.fileSystemPath); |
| 61 WebInspector.fileSystemMapping.addFileSystem(fs2.fileSystemPath); |
| 60 InspectorTest.addResult("Adding second file system."); | 62 InspectorTest.addResult("Adding second file system."); |
| 61 | 63 |
| 62 var uiSourceCodes; | 64 var uiSourceCodes; |
| 63 | 65 |
| 64 fs1.reportCreated(function() {}); | 66 fs1.reportCreated(function() {}); |
| 65 fs2.reportCreated(fileSystemCreated); | 67 fs2.reportCreated(fileSystemCreated); |
| 66 | 68 |
| 67 function fileSystemCreated() | 69 function fileSystemCreated() |
| 68 { | 70 { |
| 69 InspectorTest.addResult("Adding file mappings."); | 71 InspectorTest.addResult("Adding file mappings."); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 82 | 84 |
| 83 function onProjectsRefreshed() | 85 function onProjectsRefreshed() |
| 84 { | 86 { |
| 85 uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); | 87 uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); |
| 86 dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped); | 88 dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped); |
| 87 } | 89 } |
| 88 | 90 |
| 89 function uiSourceCodesDumped() | 91 function uiSourceCodesDumped() |
| 90 { | 92 { |
| 91 dumpUISourceCodeLocations(uiSourceCodes, 5); | 93 dumpUISourceCodeLocations(uiSourceCodes, 5); |
| 92 InspectorTest.addResult("UISourceCode uri to url mappings:"); | |
| 93 for (var i = 0; i < uiSourceCodes.length; ++i) { | |
| 94 var url = WebInspector.networkMapping.networkURL(uiSourceCod
es[i]); | |
| 95 if (!url) | |
| 96 continue; | |
| 97 InspectorTest.addResult(" " + uiSourceCodes[i].url() + "
-> " + url); | |
| 98 } | |
| 99 InspectorTest.addResult("UISourceCode url to uri mappings:"); | |
| 100 for (var i = 0; i < uiSourceCodes.length; ++i) { | |
| 101 var url = WebInspector.networkMapping.networkURL(uiSourceCod
es[i]); | |
| 102 if (!url) | |
| 103 continue; | |
| 104 var uri = WebInspector.networkMapping.uiSourceCodeForURLForA
nyTarget(url).url(); | |
| 105 InspectorTest.addResult(" " + url + " -> " + uri); | |
| 106 } | |
| 107 WebInspector.workspace.addEventListener(WebInspector.Workspace.E
vents.WorkingCopyCommitted, contentCommitted, this); | 94 WebInspector.workspace.addEventListener(WebInspector.Workspace.E
vents.WorkingCopyCommitted, contentCommitted, this); |
| 108 uiSourceCodes[0].addRevision("<Modified UISourceCode content>"); | 95 uiSourceCodes[0].addRevision("<Modified UISourceCode content>"); |
| 109 } | 96 } |
| 110 | 97 |
| 111 function contentCommitted() | 98 function contentCommitted() |
| 112 { | 99 { |
| 113 InspectorTest.addResult("After revision added:"); | 100 InspectorTest.addResult("After revision added:"); |
| 114 InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize); | 101 InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize); |
| 115 } | 102 } |
| 116 | 103 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 195 } |
| 209 } | 196 } |
| 210 ]); | 197 ]); |
| 211 }; | 198 }; |
| 212 </script> | 199 </script> |
| 213 </head> | 200 </head> |
| 214 <body onload="runTest()"> | 201 <body onload="runTest()"> |
| 215 <p>Tests file system project.</p> | 202 <p>Tests file system project.</p> |
| 216 </body> | 203 </body> |
| 217 </html> | 204 </html> |
| OLD | NEW |