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

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

Issue 2663953002: DevTools: suppress protocol errors for tests unless debugTest (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.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
3 var initialize_InspectorTest = function() { 4 var initialize_InspectorTest = function() {
4 5 Protocol.InspectorBackend.Options.suppressRequestErrors = true;
5 var results = []; 6 var results = [];
6 7
7 function consoleOutputHook(messageType) 8 function consoleOutputHook(messageType)
8 { 9 {
9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); 10 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1));
10 } 11 }
11 12
12 window._originalConsoleLog = console.log.bind(console); 13 window._originalConsoleLog = console.log.bind(console);
13 14
14 console.log = consoleOutputHook.bind(InspectorTest, "log"); 15 console.log = consoleOutputHook.bind(InspectorTest, "log");
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 1153
1153 var initializationFunctions = [ String(initialize_InspectorTest) ]; 1154 var initializationFunctions = [ String(initialize_InspectorTest) ];
1154 for (var name in window) { 1155 for (var name in window) {
1155 if (name.indexOf("initialize_") === 0 && typeof window[name] === "functi on" && name !== "initialize_InspectorTest") 1156 if (name.indexOf("initialize_") === 0 && typeof window[name] === "functi on" && name !== "initialize_InspectorTest")
1156 initializationFunctions.push(window[name].toString()); 1157 initializationFunctions.push(window[name].toString());
1157 } 1158 }
1158 var toEvaluate = "(" + initializeFrontend + ")(" + "[" + initializationFunct ions + "]" + ");"; 1159 var toEvaluate = "(" + initializeFrontend + ")(" + "[" + initializationFunct ions + "]" + ");";
1159 testRunner.evaluateInWebInspector(initializeCallId, toEvaluate); 1160 testRunner.evaluateInWebInspector(initializeCallId, toEvaluate);
1160 1161
1161 if (window.debugTest) 1162 if (window.debugTest)
1162 test = "function() { window.test = " + test.toString() + "; InspectorTes t.addResult = window._originalConsoleLog; InspectorTest.completeTest = function( ) {}; }"; 1163 test = "function() { Protocol.InspectorBackend.Options.suppressRequestEr rors = false; window.test = " + test.toString() + "; InspectorTest.addResult = w indow._originalConsoleLog; InspectorTest.completeTest = function() {}; }";
1163 toEvaluate = "(" + runTestInFrontend + ")(" + test + ");"; 1164 toEvaluate = "(" + runTestInFrontend + ")(" + test + ");";
1164 testRunner.evaluateInWebInspector(runTestCallId, toEvaluate); 1165 testRunner.evaluateInWebInspector(runTestCallId, toEvaluate);
1165 1166
1166 if (enableWatchDogWhileDebugging) { 1167 if (enableWatchDogWhileDebugging) {
1167 function watchDog() 1168 function watchDog()
1168 { 1169 {
1169 console.log("Internal watchdog triggered at 20 seconds. Test timed o ut."); 1170 console.log("Internal watchdog triggered at 20 seconds. Test timed o ut.");
1170 closeInspectorAndNotifyDone(); 1171 closeInspectorAndNotifyDone();
1171 } 1172 }
1172 window._watchDogTimer = setTimeout(watchDog, 20000); 1173 window._watchDogTimer = setTimeout(watchDog, 20000);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 _output("[page] " + text); 1226 _output("[page] " + text);
1226 } 1227 }
1227 1228
1228 function _output(result) 1229 function _output(result)
1229 { 1230 {
1230 if (!outputElement) 1231 if (!outputElement)
1231 createOutputElement(); 1232 createOutputElement();
1232 outputElement.appendChild(document.createTextNode(result)); 1233 outputElement.appendChild(document.createTextNode(result));
1233 outputElement.appendChild(document.createElement("br")); 1234 outputElement.appendChild(document.createElement("br"));
1234 } 1235 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698