| 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 20 matching lines...) Expand all Loading... |
| 31 var uiLocation = uiSourceCode.uiLocation(lineNumber); | 31 var uiLocation = uiSourceCode.uiLocation(lineNumber); |
| 32 InspectorTest.addResult(" - " + uiLocation.linkText()); | 32 InspectorTest.addResult(" - " + uiLocation.linkText()); |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 | 35 |
| 36 function dumpWorkspaceUISourceCodes() | 36 function dumpWorkspaceUISourceCodes() |
| 37 { | 37 { |
| 38 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); | 38 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); |
| 39 var uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); | 39 var uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); |
| 40 for (var i = 0; i < uiSourceCodes.length; ++i) | 40 for (var i = 0; i < uiSourceCodes.length; ++i) |
| 41 InspectorTest.addResult(" - " + uiSourceCodes[i].originURL()); | 41 InspectorTest.addResult(" - " + uiSourceCodes[i].url()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 function createFileSystem(name, callback) | 44 function createFileSystem(name, callback) |
| 45 { | 45 { |
| 46 var fs = new InspectorTest.TestFileSystem(name); | 46 var fs = new InspectorTest.TestFileSystem(name); |
| 47 fs.root.mkdir("html").addFile("foo.js", ""); | 47 fs.root.mkdir("html").addFile("foo.js", ""); |
| 48 fs.root.mkdir(".git").addFile("foogit.js", ""); | 48 fs.root.mkdir(".git").addFile("foogit.js", ""); |
| 49 fs.root.addFile("bar.js", ""); | 49 fs.root.addFile("bar.js", ""); |
| 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)); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 function uiSourceCodesDumped() | 89 function uiSourceCodesDumped() |
| 90 { | 90 { |
| 91 dumpUISourceCodeLocations(uiSourceCodes, 5); | 91 dumpUISourceCodeLocations(uiSourceCodes, 5); |
| 92 InspectorTest.addResult("UISourceCode uri to url mappings:"); | 92 InspectorTest.addResult("UISourceCode uri to url mappings:"); |
| 93 for (var i = 0; i < uiSourceCodes.length; ++i) { | 93 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 94 var url = WebInspector.networkMapping.networkURL(uiSourceCod
es[i]); | 94 var url = WebInspector.networkMapping.networkURL(uiSourceCod
es[i]); |
| 95 if (!url) | 95 if (!url) |
| 96 continue; | 96 continue; |
| 97 InspectorTest.addResult(" " + uiSourceCodes[i].uri() + "
-> " + url); | 97 InspectorTest.addResult(" " + uiSourceCodes[i].url() + "
-> " + url); |
| 98 } | 98 } |
| 99 InspectorTest.addResult("UISourceCode url to uri mappings:"); | 99 InspectorTest.addResult("UISourceCode url to uri mappings:"); |
| 100 for (var i = 0; i < uiSourceCodes.length; ++i) { | 100 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 101 var url = WebInspector.networkMapping.networkURL(uiSourceCod
es[i]); | 101 var url = WebInspector.networkMapping.networkURL(uiSourceCod
es[i]); |
| 102 if (!url) | 102 if (!url) |
| 103 continue; | 103 continue; |
| 104 var uri = WebInspector.networkMapping.uiSourceCodeForURLForA
nyTarget(url).uri(); | 104 var uri = WebInspector.networkMapping.uiSourceCodeForURLForA
nyTarget(url).url(); |
| 105 InspectorTest.addResult(" " + url + " -> " + uri); | 105 InspectorTest.addResult(" " + url + " -> " + uri); |
| 106 } | 106 } |
| 107 WebInspector.workspace.addEventListener(WebInspector.Workspace.E
vents.WorkingCopyCommitted, contentCommitted, this); | 107 WebInspector.workspace.addEventListener(WebInspector.Workspace.E
vents.WorkingCopyCommitted, contentCommitted, this); |
| 108 uiSourceCodes[0].addRevision("<Modified UISourceCode content>"); | 108 uiSourceCodes[0].addRevision("<Modified UISourceCode content>"); |
| 109 } | 109 } |
| 110 | 110 |
| 111 function contentCommitted() | 111 function contentCommitted() |
| 112 { | 112 { |
| 113 InspectorTest.addResult("After revision added:"); | 113 InspectorTest.addResult("After revision added:"); |
| 114 InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize); | 114 InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 ]); | 188 ]); |
| 189 }; | 189 }; |
| 190 </script> | 190 </script> |
| 191 </head> | 191 </head> |
| 192 <body onload="runTest()"> | 192 <body onload="runTest()"> |
| 193 <p>Tests file system project.</p> | 193 <p>Tests file system project.</p> |
| 194 </body> | 194 </body> |
| 195 </html> | 195 </html> |
| OLD | NEW |