☠☠ backed out by 1d84194ace35 ☠ ☠ | |
author | Mantaroh Yoshinaga <mantaroh@gmail.com> |
Mon, 27 Jun 2016 08:09:32 +0900 | |
changeset 342708 | 4cdb7f5b6f7c6eaea8b5ba9742df7461e462562c |
parent 342707 | e89ec30077a016f7a9e3fdd040022a5bc76da6c1 |
child 342709 | 2a2c42608ff070e826e4b548fa079e08686382b8 |
push id | 6389 |
push user | raliiev@mozilla.com |
push date | Mon, 19 Sep 2016 13:38:22 +0000 |
treeherder | mozilla-beta@01d67bfe6c81 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | birtles |
bugs | 1267510 |
milestone | 50.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
|
testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/document-timeline.html | file | annotate | diff | comparison | revisions |
--- a/testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/document-timeline.html +++ b/testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/document-timeline.html @@ -1,89 +1,59 @@ <!doctype html> <meta charset=utf-8> -<title>Web Animations API: DocumentTimeline tests</title> +<title>Default document timeline tests</title> +<link rel="help" href="https://w3c.github.io/web-animations/#the-documents-default-timeline"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <div id="log"></div> <iframe width="10" height="10" id="iframe"></iframe> <script> 'use strict'; test(function() { assert_equals(document.timeline, document.timeline, 'document.timeline returns the same object every time'); var iframe = document.getElementById('iframe'); assert_not_equals(document.timeline, iframe.contentDocument.timeline, 'document.timeline returns a different object for each document'); assert_not_equals(iframe.contentDocument.timeline, null, 'document.timeline on an iframe is not null'); -}, -'document.timeline identity tests', -{ - help: 'http://dev.w3.org/fxtf/web-animations/#the-document-timeline', - assert: [ 'Each document has a timeline called the document timeline' ], - author: 'Brian Birtles' -}); +}, 'document.timeline identity tests'); -async_test(function(t) { +promise_test(function(t) { assert_true(document.timeline.currentTime > 0, 'document.timeline.currentTime is positive'); // document.timeline.currentTime should be set even before document // load fires. We expect this code to be run before document load and hence // the above assertion is sufficient. // If the following assertion fails, this test needs to be redesigned. assert_true(document.readyState !== 'complete', 'Test is running prior to document load'); // Test that the document timeline's current time is measured from // navigationStart. // // We can't just compare document.timeline.currentTime to // window.performance.now() because currentTime is only updated on a sample // so we use requestAnimationFrame instead. - window.requestAnimationFrame(t.step_func(function(rafTime) { + return window.requestAnimationFrame(t.step_func(function(rafTime) { assert_equals(document.timeline.currentTime, rafTime, 'document.timeline.currentTime matches' + ' requestAnimationFrame time'); - t.done(); })); -}, -'document.timeline.currentTime value tests', -{ - help: [ - 'http://dev.w3.org/fxtf/web-animations/#the-global-clock', - 'http://dev.w3.org/fxtf/web-animations/#the-document-timeline' - ], - assert: [ - 'The global clock is a source of monotonically increasing time values', - 'The time values of the document timeline are calculated as a fixed' + - ' offset from the global clock', - 'the zero time corresponds to the navigationStart moment', - 'the time value of each document timeline must be equal to the time ' + - 'passed to animation frame request callbacks for that browsing context' - ], - author: 'Brian Birtles' -}); +}, 'document.timeline.currentTime value tests'); -async_test(function(t) { +promise_test(function(t) { var valueAtStart = document.timeline.currentTime; var timeAtStart = window.performance.now(); while (window.performance.now() - timeAtStart < 100) { // Wait 100ms } assert_equals(document.timeline.currentTime, valueAtStart, 'document.timeline.currentTime does not change within a script block'); - window.requestAnimationFrame(t.step_func(function() { + return window.requestAnimationFrame(t.step_func(function() { assert_true(document.timeline.currentTime > valueAtStart, 'document.timeline.currentTime increases between script blocks'); - t.done(); })); -}, -'document.timeline.currentTime liveness tests', -{ - help: 'http://dev.w3.org/fxtf/web-animations/#script-execution-and-live-updates-to-the-model', - assert: [ 'The value returned by the currentTime attribute of a' + - ' document timeline will not change within a script block' ], - author: 'Brian Birtles' -}); +}, 'document.timeline.currentTime liveness tests'); </script>