Commit d973c79f authored by rjwright@chromium.org's avatar rjwright@chromium.org

Move timeline get CSS AnimationPlayers W3C test into seperate file.

This test case fails in the Web Animations Polyfill (https://github.com/web-animations/web-animations-next) so we moved it to its own file. We don't want these tests to fork into a polyfill version and a blink version, so I'm replicating the change here.
BUG=

Review URL: https://codereview.chromium.org/650543004

git-svn-id: svn://svn.chromium.org/blink/trunk@184237 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 97cc1948
<!DOCTYPE html> <!DOCTYPE html>
<script src="../../resources/testharness.js"></script> <script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script> <script src="../../resources/testharnessreport.js"></script>
<style>
@keyframes test {
from { opacity: 0; }
to { opacity: 1; }
}
.cssAnimation {
animation: test 2s;
}
</style>
<div id='container'> <div id='container'>
<div id='element'></div> <div id='element'></div>
</div> </div>
...@@ -95,26 +86,4 @@ test(function() { ...@@ -95,26 +86,4 @@ test(function() {
}, 'getAnimationPlayers() with delays'); }, 'getAnimationPlayers() with delays');
async_test(function(t) { </script>
assert_equals(document.timeline.getAnimationPlayers().length, 0);
assert_equals(container.getAnimationPlayers().length, 0);
assert_equals(element.getAnimationPlayers().length, 0);
element.className = 'cssAnimation';
t.step(function() {
onload = function () {
var players = document.timeline.getAnimationPlayers();
assert_equals(players.length, 1);
assert_equals(container.getAnimationPlayers().length, 0);
assert_equals(element.getAnimationPlayers().length, 1);
players[0].finish();
assert_equals(document.timeline.getAnimationPlayers().length, 0);
assert_equals(container.getAnimationPlayers().length, 0);
assert_equals(element.getAnimationPlayers().length, 0);
t.done();
}
});
}, 'getAnimationPlayers() with cssanimations');
</script>
\ No newline at end of file
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script><style>
@keyframes test {
from { opacity: 0; }
to { opacity: 1; }
}
.cssAnimation {
animation: test 2s;
}
</style>
<div id='container'>
<div id='element'></div>
</div>
<script>
async_test(function(t) {
assert_equals(document.timeline.getAnimationPlayers().length, 0);
assert_equals(container.getAnimationPlayers().length, 0);
assert_equals(element.getAnimationPlayers().length, 0);
element.className = 'cssAnimation';
onload = function () {
t.step(function() {
var players = document.timeline.getAnimationPlayers();
assert_equals(players.length, 1);
assert_equals(container.getAnimationPlayers().length, 0);
assert_equals(element.getAnimationPlayers().length, 1);
players[0].finish();
assert_equals(document.timeline.getAnimationPlayers().length, 0);
assert_equals(container.getAnimationPlayers().length, 0);
assert_equals(element.getAnimationPlayers().length, 0);
t.done();
});
}
}, 'getAnimationPlayers() with cssanimations');
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment