| Index: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.js
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.js b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..be900d1ddd4f133eeb40a506f115a9741ee3a4fc
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.js
|
| @@ -0,0 +1,26 @@
|
| +(async function() {
|
| + let {page, session, Protocol} = await InspectorTest.startHTML(`
|
| + <div id='node' style='background-color: red; height: 100px; width: 100px'></div>
|
| + `, '');
|
| +
|
| + Protocol.Animation.enable();
|
| + session.evaluate(`
|
| + node.animate([{ width: '1000px' }, { width: '2000px' }], 1000);
|
| + `);
|
| +
|
| + var response = await Protocol.Animation.onceAnimationStarted();
|
| + InspectorTest.log('Animation started');
|
| + await Protocol.Animation.seekAnimations({ animations: [ response.params.animation.id ], currentTime: 2000 });
|
| +
|
| + var rafWidth = await session.evaluateAsync(`
|
| + (function rafWidth() {
|
| + var callback;
|
| + var promise = new Promise((fulfill) => callback = fulfill);
|
| + if (window.testRunner)
|
| + testRunner.layoutAndPaintAsyncThen(() => callback(node.offsetWidth));
|
| + return promise;
|
| + })()
|
| + `);
|
| + InspectorTest.log(rafWidth);
|
| + InspectorTest.completeTest();
|
| +})();
|
|
|