Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/web-animations-api/deferred-updates.html |
| diff --git a/third_party/WebKit/LayoutTests/web-animations-api/deferred-updates.html b/third_party/WebKit/LayoutTests/web-animations-api/deferred-updates.html |
| index 7f3652314cd829981f472de05ab0cf6e9c31e530..7a850dc6e218b26856596ed1a997dce4fa543bd6 100644 |
| --- a/third_party/WebKit/LayoutTests/web-animations-api/deferred-updates.html |
| +++ b/third_party/WebKit/LayoutTests/web-animations-api/deferred-updates.html |
| @@ -1,23 +1,30 @@ |
| <!DOCTYPE html> |
| +<meta charset=utf-8> |
| +<title>Deferred Updates Test</title> |
| +<link rel="help" href="http://w3c.github.io/web-animations/#model-liveness"> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| -<div id="target">Test target</div> |
| +<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
|
| +<body> |
| +<div id="target"></div> |
| <script> |
| +'use strict'; |
| var target = document.getElementById('target'); |
| test(function() { |
| - var player = target.animate([{background: 'green'}, {background: 'green'}], 10000); |
| + var animation = target.animate([{background: 'green'}, {background: 'green'}], 10000); |
| assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 128, 0)'); |
| - player.cancel(); |
| + animation.cancel(); |
| }, 'Animation effects should be visible to getComputedStyle'); |
| -var layoutTest = async_test('Animation effects should be visible to offsetHeight, etc.'); |
| +var t = async_test('Animation effects should be visible to offsetHeight, etc.'); |
| addEventListener('load', function() { |
|
alancutter (OOO until 2018)
2016/07/12 00:51:58
I don't think waiting for load is necessary for th
|
| - layoutTest.step(function() { |
| - var player = target.animate([{height: '732px'}, {height: '732px'}], 10000); |
| + t.step(function() { |
| + var animation = target.animate([{height: '732px'}, {height: '732px'}], 10000); |
| assert_equals(target.offsetHeight, 732); |
| - player.cancel(); |
| + animation.cancel(); |
| }); |
| - layoutTest.done(); |
| + t.done(); |
| target.remove(); |
| }); |
| </script> |
| +</body> |