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

Unified Diff: third_party/WebKit/LayoutTests/web-animations-api/delay-endDelay-phases.html

Issue 2139113002: Add the relevant information to the test and use testcommon.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use testcommon.js 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/web-animations-api/delay-endDelay-phases.html
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/delay-endDelay-phases.html b/third_party/WebKit/LayoutTests/web-animations-api/delay-endDelay-phases.html
index a8288cbaa7e2b5056b9263abe3512634c53be697..9b2fca197de8dc9bdd35e02db7fd4f6dcbc92779 100644
--- a/third_party/WebKit/LayoutTests/web-animations-api/delay-endDelay-phases.html
+++ b/third_party/WebKit/LayoutTests/web-animations-api/delay-endDelay-phases.html
@@ -1,16 +1,20 @@
<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Test combinations of delay and endDelay</title>
+<link rel="help" href="https://w3c.github.io/web-animations/#the-animationeffecttiming-interface">
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
+<script src="../imported/wpt/web-animations/testcommon.js"></script>
<div id="container"></div>
alancutter (OOO until 2018) 2016/07/12 03:32:30 No need for container any more, createDiv() append
nainar 2016/07/12 03:56:57 Replaced with body cause you do need a container f
<script>
function testTiming({timing, expectations}, description) {
- test(() => {
+ test((t) => {
alancutter (OOO until 2018) 2016/07/12 03:31:53 No need for brackets around t.
nainar 2016/07/12 03:56:57 Done.
for (let {at, expect} of expectations) {
- let target = document.createElement('div');
+ let target = createDiv(t);
container.appendChild(target);
let animation = target.animate({opacity: [0, 1]}, timing);
animation.currentTime = at;
- assert_equals(Number(getComputedStyle(target).opacity), expect, 'at ' + at);
+ assert_times_equal(Number(getComputedStyle(target).opacity), expect, 'at ' + at);
animation.cancel();
}
}, description);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698