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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/deferred-updates.html

Issue 2141703004: Clean up web-animations-api/deferred-updates.html test to match webkit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Deferred Updates Test</title>
4 <link rel="help" href="http://w3c.github.io/web-animations/#model-liveness">
2 <script src="../resources/testharness.js"></script> 5 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 6 <script src="../resources/testharnessreport.js"></script>
4 <div id="target">Test target</div> 7 <script src="../../../testcommon.js"></script>
alancutter (OOO until 2018) 2016/07/12 00:51:58 Does this exist? I think you want to be importing
8 <body>
9 <div id="target"></div>
5 <script> 10 <script>
11 'use strict';
6 var target = document.getElementById('target'); 12 var target = document.getElementById('target');
7 test(function() { 13 test(function() {
8 var player = target.animate([{background: 'green'}, {background: 'green'}], 10 000); 14 var animation = target.animate([{background: 'green'}, {background: 'green'}], 10000);
9 assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 128, 0)'); 15 assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 128, 0)');
10 player.cancel(); 16 animation.cancel();
11 }, 'Animation effects should be visible to getComputedStyle'); 17 }, 'Animation effects should be visible to getComputedStyle');
12 18
13 var layoutTest = async_test('Animation effects should be visible to offsetHeight , etc.'); 19 var t = async_test('Animation effects should be visible to offsetHeight, etc.');
14 addEventListener('load', function() { 20 addEventListener('load', function() {
alancutter (OOO until 2018) 2016/07/12 00:51:58 I don't think waiting for load is necessary for th
15 layoutTest.step(function() { 21 t.step(function() {
16 var player = target.animate([{height: '732px'}, {height: '732px'}], 10000); 22 var animation = target.animate([{height: '732px'}, {height: '732px'}], 10000 );
17 assert_equals(target.offsetHeight, 732); 23 assert_equals(target.offsetHeight, 732);
18 player.cancel(); 24 animation.cancel();
19 }); 25 });
20 layoutTest.done(); 26 t.done();
21 target.remove(); 27 target.remove();
22 }); 28 });
23 </script> 29 </script>
30 </body>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698