| OLD | NEW |
| 1 var initialize_WorkspaceTest = function() { | 1 var initialize_WorkspaceTest = function() { |
| 2 | 2 |
| 3 InspectorTest.createWorkspace = function(ignoreEvents) | 3 InspectorTest.createWorkspace = function(ignoreEvents) |
| 4 { | 4 { |
| 5 if (InspectorTest.testFileSystemWorkspaceBinding) | 5 if (InspectorTest.testFileSystemWorkspaceBinding) |
| 6 InspectorTest.testFileSystemWorkspaceBinding.dispose(); | 6 InspectorTest.testFileSystemWorkspaceBinding.dispose(); |
| 7 if (InspectorTest.testNetworkMapping) | 7 if (InspectorTest.testNetworkMapping) |
| 8 InspectorTest.testNetworkMapping.dispose(); | 8 InspectorTest.testNetworkMapping.dispose(); |
| 9 WebInspector.fileSystemMapping.resetForTesting(); | 9 WebInspector.fileSystemMapping.resetForTesting(); |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 InspectorTest._defaultWorkspaceEventHandler = function(event) | 127 InspectorTest._defaultWorkspaceEventHandler = function(event) |
| 128 { | 128 { |
| 129 var uiSourceCode = event.data; | 129 var uiSourceCode = event.data; |
| 130 var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode); | 130 var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode); |
| 131 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger &&
!networkURL) | 131 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger &&
!networkURL) |
| 132 return; | 132 return; |
| 133 if (uiSourceCode.project().type() === WebInspector.projectTypes.Service) | 133 if (uiSourceCode.project().type() === WebInspector.projectTypes.Service) |
| 134 return; | 134 return; |
| 135 InspectorTest.addResult("Workspace event: " + event.type + ": " + uiSourceCo
de.uri() + "."); | 135 InspectorTest.addResult("Workspace event: " + event.type + ": " + uiSourceCo
de.url() + "."); |
| 136 } | 136 } |
| 137 | 137 |
| 138 InspectorTest.uiSourceCodeURL = function(uiSourceCode) | 138 InspectorTest.uiSourceCodeURL = function(uiSourceCode) |
| 139 { | 139 { |
| 140 return uiSourceCode.originURL().replace(/.*LayoutTests/, "LayoutTests"); | 140 return uiSourceCode.url().replace(/.*LayoutTests/, "LayoutTests"); |
| 141 } | 141 } |
| 142 | 142 |
| 143 InspectorTest.dumpUISourceCode = function(uiSourceCode, callback) | 143 InspectorTest.dumpUISourceCode = function(uiSourceCode, callback) |
| 144 { | 144 { |
| 145 InspectorTest.addResult("UISourceCode: " + InspectorTest.uiSourceCodeURL(uiS
ourceCode)); | 145 InspectorTest.addResult("UISourceCode: " + InspectorTest.uiSourceCodeURL(uiS
ourceCode)); |
| 146 if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script || uiSo
urceCode.contentType() === WebInspector.resourceTypes.Document) | 146 if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script || uiSo
urceCode.contentType() === WebInspector.resourceTypes.Document) |
| 147 InspectorTest.addResult("UISourceCode is content script: " + (uiSourceCo
de.project().type() === WebInspector.projectTypes.ContentScripts)); | 147 InspectorTest.addResult("UISourceCode is content script: " + (uiSourceCo
de.project().type() === WebInspector.projectTypes.ContentScripts)); |
| 148 uiSourceCode.requestContent(didRequestContent); | 148 uiSourceCode.requestContent(didRequestContent); |
| 149 | 149 |
| 150 function didRequestContent(content, contentEncoded) | 150 function didRequestContent(content, contentEncoded) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 function uiSourceCodeAdded(event) | 187 function uiSourceCodeAdded(event) |
| 188 { | 188 { |
| 189 if (event.data.name() === name) { | 189 if (event.data.name() === name) { |
| 190 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Ev
ents.UISourceCodeAdded, uiSourceCodeAdded); | 190 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Ev
ents.UISourceCodeAdded, uiSourceCodeAdded); |
| 191 setImmediate(callback); | 191 setImmediate(callback); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 }; | 196 }; |
| OLD | NEW |