| Index: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html
|
| index 3cb267ed2bb7fd9e85bb65d6b7c4acd55b14e2a8..e0273487254f1059d72148ef2361bad0540853ef 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html
|
| @@ -15,18 +15,15 @@ function getWidth()
|
| return node.offsetWidth;
|
| }
|
|
|
| -function rafWidth(resolve, reject)
|
| +function rafWidth()
|
| {
|
| - 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;
|
| }
|
|
|
| -window.debugTest = true;
|
| function test()
|
| {
|
| InspectorTest.eventHandler["Animation.animationStarted"] = onStarted;
|
| @@ -46,11 +43,11 @@ function test()
|
|
|
| function saveWidth(nodeWidth)
|
| {
|
| - var width = nodeWidth;
|
| - InspectorTest.invokePageFunctionPromise("rafWidth", []).then(function(result) {
|
| - InspectorTest.log(result === width);
|
| - InspectorTest.completeTest();
|
| - });
|
| + InspectorTest.evaluateInPageAsync("rafWidth()")
|
| + .then(function(result) {
|
| + InspectorTest.log(result === nodeWidth);
|
| + InspectorTest.completeTest();
|
| + });
|
| }
|
| }
|
|
|
|
|