| 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/workspace-test.js"></script> | 4 <script src="../http/tests/inspector/workspace-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var uiSourceCodes = {}; | 8 var uiSourceCodes = {}; |
| 9 var projects = {}; | 9 var projects = {}; |
| 10 var workspace = new WebInspector.Workspace(); | 10 var workspace = new WebInspector.Workspace(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 var result = networkMapping.hasMappingForURL(url) | 36 var result = networkMapping.hasMappingForURL(url) |
| 37 if (result) | 37 if (result) |
| 38 InspectorTest.addResult(" url " + url + " is mapped."); | 38 InspectorTest.addResult(" url " + url + " is mapped."); |
| 39 else | 39 else |
| 40 InspectorTest.addResult(" url " + url + " is not mapped."); | 40 InspectorTest.addResult(" url " + url + " is not mapped."); |
| 41 } | 41 } |
| 42 | 42 |
| 43 function dumpUISourceCodeForURL(url) | 43 function dumpUISourceCodeForURL(url) |
| 44 { | 44 { |
| 45 var uiSourceCode = networkMapping.uiSourceCodeForURLForAnyTarget(url); | 45 var uiSourceCode = networkMapping.uiSourceCodeForURLForAnyTarget(url); |
| 46 InspectorTest.addResult(" url " + url + " is mapped to " + (uiSourceC
ode ? uiSourceCode.uri() : null)); | 46 InspectorTest.addResult(" url " + url + " is mapped to " + (uiSourceC
ode ? uiSourceCode.url() : null)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 function dumpURLForPath(fileSystemPath, filePath) | 49 function dumpURLForPath(fileSystemPath, filePath) |
| 50 { | 50 { |
| 51 var url = networkMapping._urlForPath(fileSystemPath, fileSystemPath + "/
" + filePath) | 51 var url = networkMapping._urlForPath(fileSystemPath, fileSystemPath + "/
" + filePath) |
| 52 InspectorTest.addResult(" path " + fileSystemPath + " / " + filePath
+ " is mapped to " + (url ? url : null)); | 52 InspectorTest.addResult(" path " + fileSystemPath + " / " + filePath
+ " is mapped to " + (url ? url : null)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 createUISourceCode(projectId, "file:///var/www/localhost/index.html"); | 55 createUISourceCode(projectId, "file:///var/www/localhost/index.html"); |
| 56 | 56 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 78 dumpURLForPath("file:///home/foo", "index.html"); | 78 dumpURLForPath("file:///home/foo", "index.html"); |
| 79 | 79 |
| 80 InspectorTest.completeTest(); | 80 InspectorTest.completeTest(); |
| 81 } | 81 } |
| 82 </script> | 82 </script> |
| 83 </head> | 83 </head> |
| 84 <body onload="runTest()"> | 84 <body onload="runTest()"> |
| 85 <p>Tests workspace mappings</p> | 85 <p>Tests workspace mappings</p> |
| 86 </body> | 86 </body> |
| 87 </html> | 87 </html> |
| OLD | NEW |