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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.js

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: unified Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 (async function() {
2 let {page, session, Protocol} = await InspectorTest.startHTML(`
3 <div id='node' style='background-color: red; width: 100px'></div>
4 `, 'Tests that the animation is correctly paused.');
5
6 Protocol.Animation.enable();
7 session.evaluate(`
8 window.animation = node.animate([{ width: '100px' }, { width: '2000px' }], { duration: 0, fill: 'forwards' });
9 `);
10
11 var id = (await Protocol.Animation.onceAnimationStarted()).params.animation.id ;
12 InspectorTest.log('Animation started');
13 var width = await session.evaluate('node.offsetWidth');
14 InspectorTest.log('Box is animating: ' + (width != 100).toString());
15 Protocol.Animation.setPaused({ animations: [ id ], paused: true });
16 session.evaluate('animation.cancel()');
17 width = await session.evaluate('node.offsetWidth');
18 InspectorTest.log('Animation paused');
19 InspectorTest.log('Box is animating: ' + (width != 100).toString());
20 Protocol.Animation.releaseAnimations({ animations: [ id ] });
21 width = await session.evaluate('node.offsetWidth');
22 InspectorTest.log('Animation released');
23 InspectorTest.log('Box is animating: ' + (width != 100).toString());
24 InspectorTest.completeTest();
25 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698