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

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

Issue 1808533002: DevTools: wrap console evaluation with user gesture indicator for convenience. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/network-initiator-from-console.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 InspectorTest.evaluateInPageWithTimeout = function(code) 59 InspectorTest.evaluateInPageWithTimeout = function(code)
60 { 60 {
61 // FIXME: we need a better way of waiting for chromium events to happen 61 // FIXME: we need a better way of waiting for chromium events to happen
62 InspectorTest.evaluateInPage("setTimeout(unescape('" + escape(code) + "'), 1 )"); 62 InspectorTest.evaluateInPage("setTimeout(unescape('" + escape(code) + "'), 1 )");
63 } 63 }
64 64
65 InspectorTest.evaluateFunctionInOverlay = function(func, callback) 65 InspectorTest.evaluateFunctionInOverlay = function(func, callback)
66 { 66 {
67 var expression = "testRunner.evaluateInWebInspectorOverlay(\"(\" + " + func + " + \")()\")"; 67 var expression = "testRunner.evaluateInWebInspectorOverlay(\"(\" + " + func + " + \")()\")";
68 var mainContext = InspectorTest.runtimeModel.executionContexts()[0]; 68 var mainContext = InspectorTest.runtimeModel.executionContexts()[0];
69 mainContext.evaluate(expression, "", false, false, true, false, wrapCallback ); 69 mainContext.evaluate(expression, "", false, false, true, false, false, wrapC allback);
70 70
71 function wrapCallback(val, err, result) 71 function wrapCallback(val, err, result)
72 { 72 {
73 callback(result.value) 73 callback(result.value)
74 } 74 }
75 } 75 }
76 76
77 var lastEvalId = 0; 77 var lastEvalId = 0;
78 var pendingEvalRequests = {}; 78 var pendingEvalRequests = {};
79 79
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 _output("[page] " + text); 1206 _output("[page] " + text);
1207 } 1207 }
1208 1208
1209 function _output(result) 1209 function _output(result)
1210 { 1210 {
1211 if (!outputElement) 1211 if (!outputElement)
1212 createOutputElement(); 1212 createOutputElement();
1213 outputElement.appendChild(document.createTextNode(result)); 1213 outputElement.appendChild(document.createTextNode(result));
1214 outputElement.appendChild(document.createElement("br")); 1214 outputElement.appendChild(document.createElement("br"));
1215 } 1215 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/network-initiator-from-console.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698