| Index: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.js
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.js b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2103a62343177e2dc1853bd891f16640456f3757
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.js
|
| @@ -0,0 +1,25 @@
|
| +(async function(testRunner) {
|
| + let {page, session, dp} = await testRunner.startHTML(`
|
| + <div id='node' style='background-color: red; width: 100px'></div>
|
| + `, 'Tests that the animation is correctly paused.');
|
| +
|
| + dp.Animation.enable();
|
| + session.evaluate(`
|
| + window.animation = node.animate([{ width: '100px' }, { width: '2000px' }], { duration: 0, fill: 'forwards' });
|
| + `);
|
| +
|
| + var id = (await dp.Animation.onceAnimationStarted()).params.animation.id;
|
| + testRunner.log('Animation started');
|
| + var width = await session.evaluate('node.offsetWidth');
|
| + testRunner.log('Box is animating: ' + (width != 100).toString());
|
| + dp.Animation.setPaused({ animations: [ id ], paused: true });
|
| + session.evaluate('animation.cancel()');
|
| + width = await session.evaluate('node.offsetWidth');
|
| + testRunner.log('Animation paused');
|
| + testRunner.log('Box is animating: ' + (width != 100).toString());
|
| + dp.Animation.releaseAnimations({ animations: [ id ] });
|
| + width = await session.evaluate('node.offsetWidth');
|
| + testRunner.log('Animation released');
|
| + testRunner.log('Box is animating: ' + (width != 100).toString());
|
| + testRunner.completeTest();
|
| +})
|
|
|