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

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

Issue 2450973002: [DevTools] Inherit WI.Target from Protocol.Target. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/agents-enable-disable.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 callback(); 452 callback();
453 } 453 }
454 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(chainedCallback); 454 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(chainedCallback);
455 } 455 }
456 456
457 InspectorTest.deprecatedRunAfterPendingDispatches = function(callback) 457 InspectorTest.deprecatedRunAfterPendingDispatches = function(callback)
458 { 458 {
459 var barrier = new CallbackBarrier(); 459 var barrier = new CallbackBarrier();
460 var targets = WebInspector.targetManager.targets(); 460 var targets = WebInspector.targetManager.targets();
461 for (var i = 0; i < targets.length; ++i) 461 for (var i = 0; i < targets.length; ++i)
462 targets[i]._targetProto._deprecatedRunAfterPendingDispatches(barrier.cre ateCallback()); 462 targets[i]._deprecatedRunAfterPendingDispatches(barrier.createCallback() );
463 barrier.callWhenDone(InspectorTest.safeWrap(callback)); 463 barrier.callWhenDone(InspectorTest.safeWrap(callback));
464 } 464 }
465 465
466 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey) 466 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey)
467 { 467 {
468 return new KeyboardEvent("keydown", {key: key, bubbles: true, cancelable: tr ue, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey}); 468 return new KeyboardEvent("keydown", {key: key, bubbles: true, cancelable: tr ue, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey});
469 } 469 }
470 470
471 InspectorTest.runTestSuite = function(testSuite) 471 InspectorTest.runTestSuite = function(testSuite)
472 { 472 {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 InspectorTest.cssModel = WebInspector.CSSModel.fromTarget(target); 911 InspectorTest.cssModel = WebInspector.CSSModel.fromTarget(target);
912 InspectorTest.workerManager = target.workerManager; 912 InspectorTest.workerManager = target.workerManager;
913 InspectorTest.powerProfiler = target.powerProfiler; 913 InspectorTest.powerProfiler = target.powerProfiler;
914 InspectorTest.cpuProfilerModel = target.cpuProfilerModel; 914 InspectorTest.cpuProfilerModel = target.cpuProfilerModel;
915 InspectorTest.heapProfilerModel = target.heapProfilerModel; 915 InspectorTest.heapProfilerModel = target.heapProfilerModel;
916 InspectorTest.animationModel = target.animationModel; 916 InspectorTest.animationModel = target.animationModel;
917 InspectorTest.serviceWorkerCacheModel = target.serviceWorkerCacheModel; 917 InspectorTest.serviceWorkerCacheModel = target.serviceWorkerCacheModel;
918 InspectorTest.serviceWorkerManager = target.serviceWorkerManager; 918 InspectorTest.serviceWorkerManager = target.serviceWorkerManager;
919 InspectorTest.tracingManager = target.tracingManager; 919 InspectorTest.tracingManager = target.tracingManager;
920 InspectorTest.mainTarget = target; 920 InspectorTest.mainTarget = target;
921 InspectorTest.connection = target._targetProto;
922 }, 921 },
923 922
924 targetRemoved: function(target) { } 923 targetRemoved: function(target) { }
925 }); 924 });
926 925
927 InspectorTest._panelsToPreload = []; 926 InspectorTest._panelsToPreload = [];
928 927
929 InspectorTest.preloadPanel = function(panelName) 928 InspectorTest.preloadPanel = function(panelName)
930 { 929 {
931 InspectorTest._panelsToPreload.push(panelName); 930 InspectorTest._panelsToPreload.push(panelName);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 _output("[page] " + text); 1164 _output("[page] " + text);
1166 } 1165 }
1167 1166
1168 function _output(result) 1167 function _output(result)
1169 { 1168 {
1170 if (!outputElement) 1169 if (!outputElement)
1171 createOutputElement(); 1170 createOutputElement();
1172 outputElement.appendChild(document.createTextNode(result)); 1171 outputElement.appendChild(document.createTextNode(result));
1173 outputElement.appendChild(document.createElement("br")); 1172 outputElement.appendChild(document.createElement("br"));
1174 } 1173 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/agents-enable-disable.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698