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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html

Issue 2207973003: [DevTools] Removed InspectorTest.invokePageFunctionPromise from protocol tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/inspector-protocol/animation/animation-seek-past-end.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html
index d545d124b17859bbc5b36a6d5e51e32b974b67cf..9bdbe55f4a29188abd0e7289db9a17d90869a502 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html
@@ -9,13 +9,11 @@ function startAnimation()
function rafWidth(resolve, reject)
{
- function frameCallback()
- {
- resolve(node.offsetWidth);
- }
-
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
if (window.testRunner)
- testRunner.layoutAndPaintAsyncThen(frameCallback);
+ testRunner.layoutAndPaintAsyncThen(() => callback(node.offsetWidth));
+ return promise;
}
function test()
@@ -37,10 +35,9 @@ function test()
function logWidth()
{
- InspectorTest.invokePageFunctionPromise("rafWidth", []).then(function(result) {
- InspectorTest.log(result);
- InspectorTest.completeTest();
- });
+ InspectorTest.evaluateInPageAsync("rafWidth()")
+ .then((result) => InspectorTest.log(result))
+ .then(() => InspectorTest.completeTest());
}
}

Powered by Google App Engine
This is Rietveld 408576698