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

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

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
index c734b2d358a4d0da450010fa2feef3b7083a581c..8aff48664e00a94b848e40507db21c4462c5794a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
@@ -110,56 +110,6 @@ InspectorTest.evaluateFunctionInOverlay = function(func, callback)
}
}
-InspectorTest.waitForOverlayRepaint = function(callback)
-{
- InspectorTest.invokePageFunctionAsync("requestAnimationFrame", callback);
-}
-
-var lastEvalId = 0;
-var pendingEvalRequests = {};
-
-/**
- * @param {string} functionName
- * @param {...} varArgs
- * @param {function()} callback
- */
-InspectorTest.invokePageFunctionAsync = function(functionName, varArgs)
-{
- var id = ++lastEvalId;
- var args = Array.prototype.slice.call(arguments, 1);
- var callback = args.pop();
- pendingEvalRequests[id] = InspectorTest.safeWrap(callback);
- var asyncEvalWrapper = function(callId, functionName, argsString)
- {
- function evalCallback(result)
- {
- testRunner.evaluateInWebInspector(evalCallbackCallId, "InspectorTest.didInvokePageFunctionAsync(" + callId + ", " + JSON.stringify(result) + ");");
- }
- var argsArray = argsString.replace(/^\[(.*)\]$/, "$1");
- if (argsArray.length)
- argsArray += ",";
- try {
- eval(functionName + "(" + argsArray + evalCallback + ")");
- } catch(e) {
- InspectorTest.addResult("Error: " + e);
- evalCallback(String(e));
- }
- }
- var escapedJSONArgs = JSON.stringify(JSON.stringify(args));
- InspectorTest.evaluateInPage("(" + asyncEvalWrapper.toString() + ")(" + id + ", unescape('" + escape(functionName) + "')," + escapedJSONArgs + ")");
-}
-
-InspectorTest.didInvokePageFunctionAsync = function(callId, value)
-{
- var callback = pendingEvalRequests[callId];
- if (!callback) {
- InspectorTest.addResult("Missing callback for async eval " + callId + ", perhaps callback invoked twice?");
- return;
- }
- delete pendingEvalRequests[callId];
- callback(value);
-}
-
InspectorTest.check = function(passCondition, failureText)
{
if (!passCondition)

Powered by Google App Engine
This is Rietveld 408576698