author | Stephen McGruer <smcgruer@chromium.org> |
Mon, 09 Apr 2018 16:33:35 +0000 | |
changeset 413479 | 64dea8aab980a6df6cfc3fb9644f7255ec2bd905 |
parent 413478 | e64205aeff2efb2c164d4936d145324771a43d5a |
child 413480 | 84afb57ee4638fc678d5dd06bf68b8a70e7b2c29 |
push id | 33850 |
push user | apavel@mozilla.com |
push date | Mon, 16 Apr 2018 09:53:48 +0000 |
treeherder | mozilla-central@6276ec7ebbf3 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | testonly |
bugs | 1452138, 818196, 946050, 542682 |
milestone | 61.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -600613,17 +600613,17 @@ "72b89e78ca7dac261af8de370389d89c810b3718", "testharness" ], "web-animations/timing-model/animations/seamlessly-updating-the-playback-rate-of-an-animation.html": [ "a7e28aa0b40a39b00da257e347cb6ecf8d1d2882", "testharness" ], "web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html": [ - "a7da92b9624750eccb9dce1d32e522fdbb65176f", + "aa5f258132490ade2dbd9485c85f749cbab293a5", "testharness" ], "web-animations/timing-model/animations/setting-the-playback-rate-of-an-animation.html": [ "b2698d9a829a1eadb3ef3b6d8e0050e7a6315305", "testharness" ], "web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html": [ "cf6040eb52964f12b06a9e3cdf14948ce8141270",
--- a/testing/web-platform/tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html +++ b/testing/web-platform/tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html @@ -6,16 +6,49 @@ <script src='/resources/testharness.js'></script> <script src='/resources/testharnessreport.js'></script> <script src='../../testcommon.js'></script> <body> <div id='log'></div> <script> 'use strict'; +test(t => { + const anim = new Animation(); + assert_equals(anim.playState, 'idle'); + assert_equals(anim.currentTime, null); + + // This should not throw because the currentTime is already null. + anim.currentTime = null; +}, 'Setting the current time of a pending animation to unresolved does not' + + ' throw a TypeError'); + +promise_test(async t => { + const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); + await anim.ready; + + assert_greater_than_equal(anim.currentTime, 0); + assert_throws({ name: 'TypeError' }, () => { + anim.currentTime = null; + }); +}, 'Setting the current time of a playing animation to unresolved throws a' + + ' TypeError'); + +promise_test(async t => { + const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); + await anim.ready; + anim.pause(); + + assert_greater_than_equal(anim.currentTime, 0); + assert_throws({ name: 'TypeError' }, () => { + anim.currentTime = null; + }); +}, 'Setting the current time of a paused animation to unresolved throws a' + + ' TypeError'); + promise_test(async t => { const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); await anim.ready; anim.pause(); // We should be pause-pending now assert_true(anim.pending); assert_equals(anim.playState, 'paused');