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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.js

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: Protocol -> dp 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(testRunner) {
2 let {page, session, dp} = await testRunner.startHTML(`
3 <div id='node' style='background-color: red; height: 100px; width: 100px'></ div>
4 `, '');
5
6 dp.Animation.enable();
7 session.evaluate(`
8 node.animate([{ width: '1000px' }, { width: '2000px' }], 1000);
9 `);
10
11 var response = await dp.Animation.onceAnimationStarted();
12 testRunner.log('Animation started');
13 await dp.Animation.seekAnimations({ animations: [ response.params.animation.id ], currentTime: 2000 });
14
15 var rafWidth = await session.evaluateAsync(`
16 (function rafWidth() {
17 var callback;
18 var promise = new Promise((fulfill) => callback = fulfill);
19 if (window.testRunner)
20 testRunner.layoutAndPaintAsyncThen(() => callback(node.offsetWidth)) ;
21 return promise;
22 })()
23 `);
24 testRunner.log(rafWidth);
25 testRunner.completeTest();
26 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698