Bug 1267510 part 1 - Add DocumentTimeline constructor tests. r=birtles
☠☠ backed out by 1d84194ace35 ☠ ☠
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Mon, 27 Jun 2016 08:09:07 +0900
changeset 342702 a7d18185f28dc16b6726ca840033924e4750e77f
parent 342701 b0ecb5f3f7b7655f1f1a8e9df3f8d17eb3bdc0e7
child 342703 058ad3199edbd1e5248b344b2146ae5a1d0d0582
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1267510
milestone50.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
Bug 1267510 part 1 - Add DocumentTimeline constructor tests. r=birtles MozReview-Commit-ID: A6vSuodpWGQ
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/web-animations/interfaces/AnimationTimeline/idlharness.html.ini
testing/web-platform/meta/web-animations/interfaces/DocumentTimeline/constructor.html.ini
testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/idlharness.html
testing/web-platform/tests/web-animations/interfaces/DocumentTimeline/constructor.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -36082,20 +36082,20 @@
       {
         "path": "webdriver/navigation.py",
         "url": "/webdriver/navigation.py"
       }
     ]
   },
   "local_changes": {
     "deleted": [
+      "WebCryptoAPI/generateKey/failures.worker.js",
       "WebCryptoAPI/generateKey/successes.worker.js",
-      "WebCryptoAPI/generateKey/failures.worker.js",
-      "WebCryptoAPI/generateKey/test_failures.html",
-      "WebCryptoAPI/generateKey/test_successes.html"
+      "WebCryptoAPI/generateKey/test_successes.html",
+      "WebCryptoAPI/generateKey/test_failures.html"
     ],
     "deleted_reftests": {},
     "items": {
       "testharness": {
         "WebCryptoAPI/generateKey/failures_AES-CBC.worker.js": [
           {
             "path": "WebCryptoAPI/generateKey/failures_AES-CBC.worker.js",
             "url": "/WebCryptoAPI/generateKey/failures_AES-CBC.worker"
@@ -36367,33 +36367,39 @@
             "path": "WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html",
             "timeout": "long",
             "url": "/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html"
           }
         ],
         "XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html": [
           {
             "path": "XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html",
-              "url": "/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html"
+            "url": "/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html"
           }
         ],
         "editing/run/justifycenter.html": [
           {
             "path": "editing/run/justifycenter.html",
             "timeout": "long",
             "url": "/editing/run/justifycenter.html"
           }
         ],
         "editing/run/multitest.html": [
           {
             "path": "editing/run/multitest.html",
             "timeout": "long",
             "url": "/editing/run/multitest.html"
           }
         ],
+        "web-animations/interfaces/DocumentTimeline/constructor.html": [
+          {
+            "path": "web-animations/interfaces/DocumentTimeline/constructor.html",
+            "url": "/web-animations/interfaces/DocumentTimeline/constructor.html"
+          }
+        ],
         "webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html": [
           {
             "path": "webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html",
             "url": "/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html"
           }
         ],
         "webaudio/the-audio-api/the-audioparam-interface/setValueAtTime-within-block.html": [
           {
--- a/testing/web-platform/meta/web-animations/interfaces/AnimationTimeline/idlharness.html.ini
+++ b/testing/web-platform/meta/web-animations/interfaces/AnimationTimeline/idlharness.html.ini
@@ -1,6 +1,7 @@
 [idlharness.html]
   type: testharness
   prefs: [dom.animations-api.core.enabled:true]
-  [AnimationTimeline must be primary interface of document.timeline]
+  [DocumentTimeline interface object length]
     expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1267510
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/web-animations/interfaces/DocumentTimeline/constructor.html.ini
@@ -0,0 +1,13 @@
+[constructor.html]
+  type: testharness
+  [zero origin time]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1267510
+
+  [positive origin time]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1267510
+
+  [negative origin time]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1267510
--- a/testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/idlharness.html
+++ b/testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/idlharness.html
@@ -1,29 +1,33 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>Web Animations API: DocumentTimeline tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/resources/WebIDLParser.js"></script>
 <script src="/resources/idlharness.js"></script>
 <div id="log"></div>
-<script type="text/plain" id="DocumentTimeline-IDL">
+<script type="text/plain" id="AnimationTimeline-IDL">
 interface AnimationTimeline {
   readonly attribute double? currentTime;
 };
-
+</script>
+<script type="text/plain" id="DocumentTimeline-IDL">
+[Constructor (DOMHighResTimeStamp originTime)]
 interface DocumentTimeline : AnimationTimeline {
 };
 </script>
 <script>
 'use strict';
 
 var idlArray;
 test(function() {
   idlArray = new IdlArray();
+  idlArray.add_untested_idls(
+    document.getElementById('AnimationTimeline-IDL').textContent);
   idlArray.add_idls(
     document.getElementById('DocumentTimeline-IDL').textContent);
   idlArray.add_objects( { DocumentTimeline: ['document.timeline'] } );
 });
 idlArray.test();
 
 </script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/web-animations/interfaces/DocumentTimeline/constructor.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>DocumentTimeline constructor tests</title>
+<link rel="help" href="https://w3c.github.io/web-animations/#the-documenttimeline-interface">
+<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(function(t) {
+  var timeline = new DocumentTimeline(0);
+
+  assert_times_equal(timeline.currentTime, document.timeline.currentTime);
+}, 'zero origin time');
+
+test(function(t) {
+  var timeline = new DocumentTimeline(10 * MS_PER_SEC);
+
+  assert_times_equal(timeline.currentTime,
+                     (document.timeline.currentTime - 10 * MS_PER_SEC));
+}, 'positive origin time');
+
+test(function(t) {
+  var timeline = new DocumentTimeline(-10 * MS_PER_SEC);
+
+  assert_times_equal(timeline.currentTime,
+                (document.timeline.currentTime + 10 * MS_PER_SEC));
+}, 'negative origin time');
+
+</script>
+</body>