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 function test() | 9 function test() |
10 { | 10 { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 fs.reportCreated(fileSystemCreated1); | 49 fs.reportCreated(fileSystemCreated1); |
50 var networkUISourceCode; | 50 var networkUISourceCode; |
51 | 51 |
52 function fileSystemCreated1() | 52 function fileSystemCreated1() |
53 { | 53 { |
54 InspectorTest.addResult("Adding network resource."); | 54 InspectorTest.addResult("Adding network resource."); |
55 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht ml/foo.js", WebInspector.resourceTypes.Script, "<foo content>"); | 55 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht ml/foo.js", WebInspector.resourceTypes.Script, "<foo content>"); |
56 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba r.js", WebInspector.resourceTypes.Script, "<foo content>"); | 56 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba r.js", WebInspector.resourceTypes.Script, "<foo content>"); |
57 dumpFileSystemUISourceCodesMappings(); | 57 dumpFileSystemUISourceCodesMappings(); |
58 | 58 |
59 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(file SystemProjectId, "html/foo.js"); | 59 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(file SystemProjectId, "file:///var/www/html/foo.js"); |
60 networkUISourceCode = InspectorTest.testWorkspace.uiSourceCode(W ebInspector.NetworkProject.projectId(target, "http://localhost"), "html/foo.js") ; | 60 networkUISourceCode = InspectorTest.testWorkspace.uiSourceCode(W ebInspector.NetworkProject.projectId(target), "http://localhost/html/foo.js"); |
dgozman
2015/12/16 07:58:30
...projectId(target, false)
pfeldman
2015/12/16 18:02:18
Done.
| |
61 InspectorTest.addResult("Adding mapping between network and file system resources."); | 61 InspectorTest.addResult("Adding mapping between network and file system resources."); |
62 InspectorTest.testNetworkMapping.addMapping(networkUISourceCode, uiSourceCode); | 62 InspectorTest.testNetworkMapping.addMapping(networkUISourceCode, uiSourceCode); |
63 var setting = JSON.stringify(WebInspector.fileSystemMapping._fil eSystemMappingSetting.get()); | 63 var setting = JSON.stringify(WebInspector.fileSystemMapping._fil eSystemMappingSetting.get()); |
64 | 64 |
65 InspectorTest.addResult("Emulate reloading inspector."); | 65 InspectorTest.addResult("Emulate reloading inspector."); |
66 fs.reportRemoved(); | 66 fs.reportRemoved(); |
67 createWorkspaceWithTarget(); | 67 createWorkspaceWithTarget(); |
68 WebInspector.fileSystemMapping._fileSystemMappingSetting.set(JSO N.parse(setting)); | 68 WebInspector.fileSystemMapping._fileSystemMappingSetting.set(JSO N.parse(setting)); |
69 WebInspector.fileSystemMapping._loadFromSettings(); | 69 WebInspector.fileSystemMapping._loadFromSettings(); |
70 fs.reportCreated(fileSystemCreated2); | 70 fs.reportCreated(fileSystemCreated2); |
71 } | 71 } |
72 | 72 |
73 function fileSystemCreated2() | 73 function fileSystemCreated2() |
74 { | 74 { |
75 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht ml/foo.js", WebInspector.resourceTypes.Script, "<foo content>"); | 75 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht ml/foo.js", WebInspector.resourceTypes.Script, "<foo content>"); |
76 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba r.js", WebInspector.resourceTypes.Script, "<foo content>"); | 76 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba r.js", WebInspector.resourceTypes.Script, "<foo content>"); |
77 dumpFileSystemUISourceCodesMappings(); | 77 dumpFileSystemUISourceCodesMappings(); |
78 | 78 |
79 InspectorTest.addResult("Removing mapping between network and fi le system resources."); | 79 InspectorTest.addResult("Removing mapping between network and fi le system resources."); |
80 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(file SystemProjectId, "html/foo.js"); | 80 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(file SystemProjectId, "file:///var/www/html/foo.js"); |
81 InspectorTest.testNetworkMapping.removeMapping(uiSourceCode); | 81 InspectorTest.testNetworkMapping.removeMapping(uiSourceCode); |
82 | 82 |
83 InspectorTest.addResult("Emulate reloading inspector."); | 83 InspectorTest.addResult("Emulate reloading inspector."); |
84 fs.reportRemoved(); | 84 fs.reportRemoved(); |
85 createWorkspaceWithTarget(); | 85 createWorkspaceWithTarget(); |
86 fs.reportCreated(fileSystemCreated3); | 86 fs.reportCreated(fileSystemCreated3); |
87 } | 87 } |
88 | 88 |
89 function fileSystemCreated3() | 89 function fileSystemCreated3() |
90 { | 90 { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 fs.root.mkdir("html").addFile("foo.js", originalFileContent); | 132 fs.root.mkdir("html").addFile("foo.js", originalFileContent); |
133 fs.root.addFile("bar.js", "<bar content>"); | 133 fs.root.addFile("bar.js", "<bar content>"); |
134 InspectorTest.addResult("Adding file system mapping."); | 134 InspectorTest.addResult("Adding file system mapping."); |
135 fs.addFileMapping("http://localhost/", "/"); | 135 fs.addFileMapping("http://localhost/", "/"); |
136 fs.reportCreated(fileSystemCreated); | 136 fs.reportCreated(fileSystemCreated); |
137 | 137 |
138 function fileSystemCreated() | 138 function fileSystemCreated() |
139 { | 139 { |
140 loadScript(); | 140 loadScript(); |
141 | 141 |
142 uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(fileSyst emProjectId, "html/foo.js"); | 142 uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(fileSyst emProjectId, "file:///var/www/html/foo.js"); |
143 InspectorTest.showUISourceCode(uiSourceCode, didShowScriptSource ); | 143 InspectorTest.showUISourceCode(uiSourceCode, didShowScriptSource ); |
144 } | 144 } |
145 | 145 |
146 function dumpUISourceCodeAndScriptContents() | 146 function dumpUISourceCodeAndScriptContents() |
147 { | 147 { |
148 InspectorTest.addResult("Dumping uiSourceCode and script content :"); | 148 InspectorTest.addResult("Dumping uiSourceCode and script content :"); |
149 InspectorTest.addResult(" uiSourceCode: " + uiSourceCode.work ingCopy()); | 149 InspectorTest.addResult(" uiSourceCode: " + uiSourceCode.work ingCopy()); |
150 InspectorTest.addResult(" script: " + scriptContent); | 150 InspectorTest.addResult(" script: " + scriptContent); |
151 } | 151 } |
152 | 152 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 } | 335 } |
336 } | 336 } |
337 ]); | 337 ]); |
338 }; | 338 }; |
339 </script> | 339 </script> |
340 </head> | 340 </head> |
341 <body onload="runTest()"> | 341 <body onload="runTest()"> |
342 <p>Tests file system project mappings.</p> | 342 <p>Tests file system project mappings.</p> |
343 </body> | 343 </body> |
344 </html> | 344 </html> |
OLD | NEW |