Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/DocumentTimeline/constructor.html

Issue 2143653006: Import wpt@c875b4212a473363afe8c09f012edf201386cb5b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update W3CImportExpectations Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/DocumentTimeline/constructor.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/DocumentTimeline/constructor.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/DocumentTimeline/constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..efdf1118e2ea33559a85507e1104a828f81596ce
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/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>

Powered by Google App Engine
This is Rietveld 408576698