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

Unified Diff: third_party/WebKit/LayoutTests/animations/fill-mode-missing-from-to-keyframes.html

Issue 2975723002: Move direction and fill tests to subdirectory (Closed)
Patch Set: Created 3 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/animations/fill-mode-missing-from-to-keyframes.html
diff --git a/third_party/WebKit/LayoutTests/animations/fill-mode-missing-from-to-keyframes.html b/third_party/WebKit/LayoutTests/animations/fill-mode-missing-from-to-keyframes.html
deleted file mode 100644
index a8faa9e330d784d01bb506f8925882f51e49a443..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/animations/fill-mode-missing-from-to-keyframes.html
+++ /dev/null
@@ -1,194 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Test missing keyframes with fill modes</title>
- <style type="text/css" media="screen">
- .box {
- position: relative;
- left: 100px;
- top: 10px;
- height: 30px;
- width: 200px;
- animation-delay: 0.1s;
- animation-duration: 0.1s;
- animation-timing-function: linear;
- }
- @keyframes anim1 {
- from { left: 200px; }
- 50% { left: 250px; }
- to { left: 300px; }
- }
- @keyframes anim2 {
- 50% { left: 250px; }
- to { left: 300px; }
- }
- @keyframes anim3 {
- from { left: 200px; }
- 50% { left: 250px; }
- }
- @keyframes anim4 {
- 50% { left: 250px; }
- }
-
- #a {
- background-color: blue;
- animation-fill-mode: none;
- animation-name: anim1;
- }
- #b {
- background-color: red;
- animation-fill-mode: backwards;
- animation-name: anim1;
- }
- #c {
- background-color: green;
- animation-fill-mode: forwards;
- animation-name: anim1;
- }
- #d {
- background-color: yellow;
- animation-fill-mode: both;
- animation-name: anim1;
- }
- #e {
- background-color: #999;
- animation-fill-mode: both;
- animation-iteration-count: 2;
- animation-direction: alternate;
- animation-name: anim1;
- }
-
- #f {
- background-color: blue;
- animation-fill-mode: none;
- animation-name: anim2;
- }
- #g {
- background-color: red;
- animation-fill-mode: backwards;
- animation-name: anim2;
- }
- #h {
- background-color: green;
- animation-fill-mode: forwards;
- animation-name: anim2;
- }
- #i {
- background-color: yellow;
- animation-fill-mode: both;
- animation-name: anim2;
- }
- #j {
- background-color: #999;
- animation-fill-mode: both;
- animation-iteration-count: 2;
- animation-direction: alternate;
- animation-name: anim2;
- }
-
- </style>
- <script type="text/javascript" charset="utf-8">
- const numAnims = 10;
- var animsFinished = 0;
- const allowance = 5;
- const expectedValues = [
- {id: "a", start: 100, end: 100},
- {id: "b", start: 200, end: 100},
- {id: "c", start: 100, end: 300},
- {id: "d", start: 200, end: 300},
- {id: "e", start: 200, end: 200}
- ];
- var result = "";
-
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- function animationEnded(event) {
- if (++animsFinished == numAnims) {
- setTimeout(endTest, 0); // this set timeout should be ok in the test environment
- // since we're just giving style a chance to resolve
- }
- };
-
- function endTest() {
-
- for (var i=0; i < expectedValues.length; i++) {
- var el = document.getElementById(expectedValues[i].id);
- var expectedValue = expectedValues[i].end;
- var realValue = parseFloat(window.getComputedStyle(el).left);
- if (Math.abs(expectedValue - realValue) < allowance) {
- result += "PASS";
- } else {
- result += "FAIL";
- }
- result += " - end of animation - id: " + expectedValues[i].id + " expected: " + expectedValue + " actual: " + realValue + "<br>";
- }
- document.getElementById('result').innerHTML = result;
-
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- window.onload = function () {
- for (var i=0; i < expectedValues.length; i++) {
- var el = document.getElementById(expectedValues[i].id);
- var expectedValue = expectedValues[i].start;
- var realValue = parseFloat(window.getComputedStyle(el).left);
- if (Math.abs(expectedValue - realValue) < allowance) {
- result += "PASS";
- } else {
- result += "FAIL";
- }
- result += " - start of animation - id: " + expectedValues[i].id + " expected: " + expectedValue + " actual: " + realValue + "<br>";
- }
- document.addEventListener("animationend", animationEnded, false);
- };
-
- </script>
-</head>
-<body>
-This test performs an animation of the left property with four different
-fill modes. It animates over 0.1 second with a 0.1 second delay.
-It takes snapshots at document load and the end of the animation.
-
-<div id="a" class="box">
- None - from/to present
-</div>
-<div id="b" class="box">
- Backwards - from/to present
-</div>
-<div id="c" class="box">
- Forwards - from/to present
-</div>
-<div id="d" class="box">
- Both - from/to present
-</div>
-<div id="e" class="box">
- Both iterating - from/to present
-</div>
-
-<div id="f" class="box">
- None - from missing
-</div>
-<div id="g" class="box">
- Backwards - from missing
-</div>
-<div id="h" class="box">
- Forwards - from missing
-</div>
-<div id="i" class="box">
- Both - from missing
-</div>
-<div id="j" class="box">
- Both iterating - from missing
-</div>
-
-<div id="result">
-</div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698