Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js

Issue 2647153002: [DevTools] Improve context and target naming. (Closed)
Patch Set: fixed comments and sorting Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 if (window.GCController) 1 if (window.GCController)
2 GCController.collectAll(); 2 GCController.collectAll();
3 var initialize_InspectorTest = function() { 3 var initialize_InspectorTest = function() {
4 4
5 var results = []; 5 var results = [];
6 6
7 function consoleOutputHook(messageType) 7 function consoleOutputHook(messageType)
8 { 8 {
9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1));
10 } 10 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 InspectorTest.waitForUISourceCodeRemoved = function(callback) 441 InspectorTest.waitForUISourceCodeRemoved = function(callback)
442 { 442 {
443 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCode Removed, uiSourceCodeRemoved); 443 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCode Removed, uiSourceCodeRemoved);
444 function uiSourceCodeRemoved(event) 444 function uiSourceCodeRemoved(event)
445 { 445 {
446 Workspace.workspace.removeEventListener(Workspace.Workspace.Events.UISou rceCodeRemoved, uiSourceCodeRemoved); 446 Workspace.workspace.removeEventListener(Workspace.Workspace.Events.UISou rceCodeRemoved, uiSourceCodeRemoved);
447 callback(event.data); 447 callback(event.data);
448 } 448 }
449 } 449 }
450 450
451 InspectorTest.createMockTarget = function(name, capabilities) 451 InspectorTest.createMockTarget = function(name, capabilities, dontAttachToMain)
452 { 452 {
453 return SDK.targetManager.createTarget(name, capabilities || SDK.Target.Capab ility.AllForTests, params => new SDK.StubConnection(params), null); 453 return SDK.targetManager.createTarget(name, capabilities || SDK.Target.Capab ility.AllForTests, params => new SDK.StubConnection(params), dontAttachToMain ? null : InspectorTest.mainTarget);
454 } 454 }
455 455
456 InspectorTest.assertGreaterOrEqual = function(a, b, message) 456 InspectorTest.assertGreaterOrEqual = function(a, b, message)
457 { 457 {
458 if (a < b) 458 if (a < b)
459 InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a + " < " + b); 459 InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a + " < " + b);
460 } 460 }
461 461
462 InspectorTest.navigate = function(url, callback) 462 InspectorTest.navigate = function(url, callback)
463 { 463 {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 _output("[page] " + text); 1225 _output("[page] " + text);
1226 } 1226 }
1227 1227
1228 function _output(result) 1228 function _output(result)
1229 { 1229 {
1230 if (!outputElement) 1230 if (!outputElement)
1231 createOutputElement(); 1231 createOutputElement();
1232 outputElement.appendChild(document.createTextNode(result)); 1232 outputElement.appendChild(document.createTextNode(result));
1233 outputElement.appendChild(document.createElement("br")); 1233 outputElement.appendChild(document.createElement("br"));
1234 } 1234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698