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

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

Issue 2751173003: [DevTools] Turn ConsoleModel into a singleton (Closed)
Patch Set: rebased Created 3 years, 9 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 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 InspectorTest.domModel = SDK.DOMModel.fromTarget(target); 980 InspectorTest.domModel = SDK.DOMModel.fromTarget(target);
981 InspectorTest.cssModel = target.model(SDK.CSSModel); 981 InspectorTest.cssModel = target.model(SDK.CSSModel);
982 InspectorTest.powerProfiler = target.powerProfiler; 982 InspectorTest.powerProfiler = target.powerProfiler;
983 InspectorTest.cpuProfilerModel = target.model(SDK.CPUProfilerModel); 983 InspectorTest.cpuProfilerModel = target.model(SDK.CPUProfilerModel);
984 InspectorTest.heapProfilerModel = target.heapProfilerModel; 984 InspectorTest.heapProfilerModel = target.heapProfilerModel;
985 InspectorTest.animationModel = target.animationModel; 985 InspectorTest.animationModel = target.animationModel;
986 InspectorTest.serviceWorkerCacheModel = target.serviceWorkerCacheModel; 986 InspectorTest.serviceWorkerCacheModel = target.serviceWorkerCacheModel;
987 InspectorTest.serviceWorkerManager = target.model(SDK.ServiceWorkerManag er); 987 InspectorTest.serviceWorkerManager = target.model(SDK.ServiceWorkerManag er);
988 InspectorTest.tracingManager = target.model(SDK.TracingManager); 988 InspectorTest.tracingManager = target.model(SDK.TracingManager);
989 InspectorTest.mainTarget = target; 989 InspectorTest.mainTarget = target;
990 Promise.resolve().then(() => { InspectorTest.consoleModel = SDK.multitar getConsoleModel._consoleModels.get(target); }); 990 InspectorTest.consoleModel = SDK.consoleModel;
991 }, 991 },
992 992
993 targetRemoved: function(target) { } 993 targetRemoved: function(target) { }
994 }); 994 });
995 995
996 InspectorTest._panelsToPreload = []; 996 InspectorTest._panelsToPreload = [];
997 997
998 InspectorTest.preloadPanel = function(panelName) 998 InspectorTest.preloadPanel = function(panelName)
999 { 999 {
1000 InspectorTest._panelsToPreload.push(panelName); 1000 InspectorTest._panelsToPreload.push(panelName);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698