| OLD | NEW |
| 1 if (window.GCController) | 1 if (window.GCController) |
| 2 GCController.collectAll(); | 2 GCController.collectAll(); |
| 3 | 3 |
| 4 var initialize_InspectorTest = function() { | 4 var initialize_InspectorTest = function() { |
| 5 Protocol.InspectorBackend.Options.suppressRequestErrors = true; | 5 Protocol.InspectorBackend.Options.suppressRequestErrors = true; |
| 6 var results = []; | 6 var results = []; |
| 7 | 7 |
| 8 function consoleOutputHook(messageType) | 8 function consoleOutputHook(messageType) |
| 9 { | 9 { |
| 10 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 10 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 { | 402 { |
| 403 InspectorTest.addResult(view instanceof Sources.SourcesNavigatorView ? "Sour
ces:" : "Content Scripts:"); | 403 InspectorTest.addResult(view instanceof Sources.SourcesNavigatorView ? "Sour
ces:" : "Content Scripts:"); |
| 404 view._groupByFrame = mode.includes("frame"); | 404 view._groupByFrame = mode.includes("frame"); |
| 405 view._groupByDomain = mode.includes("domain"); | 405 view._groupByDomain = mode.includes("domain"); |
| 406 view._groupByFolder = mode.includes("folder"); | 406 view._groupByFolder = mode.includes("folder"); |
| 407 view._resetForTest(); | 407 view._resetForTest(); |
| 408 InspectorTest.addResult("-------- Setting mode: [" + mode + "]"); | 408 InspectorTest.addResult("-------- Setting mode: [" + mode + "]"); |
| 409 InspectorTest.dumpNavigatorView(view); | 409 InspectorTest.dumpNavigatorView(view); |
| 410 } | 410 } |
| 411 | 411 |
| 412 InspectorTest.waitForUISourceCode = function(url, projectType) | 412 InspectorTest.waitForUISourceCode = function(urlSuffix, projectType) |
| 413 { | 413 { |
| 414 function matches(uiSourceCode) | 414 function matches(uiSourceCode) |
| 415 { | 415 { |
| 416 if (projectType && uiSourceCode.project().type() !== projectType) | 416 if (projectType && uiSourceCode.project().type() !== projectType) |
| 417 return false; | 417 return false; |
| 418 if (!projectType && uiSourceCode.project().type() === Workspace.projectT
ypes.Service) | 418 if (!projectType && uiSourceCode.project().type() === Workspace.projectT
ypes.Service) |
| 419 return false; | 419 return false; |
| 420 if (url && !uiSourceCode.url().endsWith(url)) | 420 if (urlSuffix && !uiSourceCode.url().endsWith(urlSuffix)) |
| 421 return false; | 421 return false; |
| 422 return true; | 422 return true; |
| 423 } | 423 } |
| 424 | 424 |
| 425 for (var uiSourceCode of Workspace.workspace.uiSourceCodes()) { | 425 for (var uiSourceCode of Workspace.workspace.uiSourceCodes()) { |
| 426 if (url && matches(uiSourceCode)) | 426 if (urlSuffix && matches(uiSourceCode)) |
| 427 return Promise.resolve(uiSourceCode); | 427 return Promise.resolve(uiSourceCode); |
| 428 } | 428 } |
| 429 | 429 |
| 430 var fulfill; | 430 var fulfill; |
| 431 var promise = new Promise(x => fulfill = x); | 431 var promise = new Promise(x => fulfill = x); |
| 432 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCode
Added, uiSourceCodeAdded); | 432 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCode
Added, uiSourceCodeAdded); |
| 433 return promise; | 433 return promise; |
| 434 | 434 |
| 435 function uiSourceCodeAdded(event) | 435 function uiSourceCodeAdded(event) |
| 436 { | 436 { |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 _output("[page] " + text); | 1237 _output("[page] " + text); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 function _output(result) | 1240 function _output(result) |
| 1241 { | 1241 { |
| 1242 if (!outputElement) | 1242 if (!outputElement) |
| 1243 createOutputElement(); | 1243 createOutputElement(); |
| 1244 outputElement.appendChild(document.createTextNode(result)); | 1244 outputElement.appendChild(document.createTextNode(result)); |
| 1245 outputElement.appendChild(document.createElement("br")); | 1245 outputElement.appendChild(document.createElement("br")); |
| 1246 } | 1246 } |
| OLD | NEW |