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

Unified Diff: LayoutTests/animations/wrong-keyframe-name.html

Issue 14556022: Simplify animation testing API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 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: LayoutTests/animations/wrong-keyframe-name.html
diff --git a/LayoutTests/animations/wrong-keyframe-name.html b/LayoutTests/animations/wrong-keyframe-name.html
new file mode 100644
index 0000000000000000000000000000000000000000..72ed1c630fe3b7095e733188b487805ae3f469a5
--- /dev/null
+++ b/LayoutTests/animations/wrong-keyframe-name.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<style>
+#test1 {
+ -webkit-animation-fill-mode: forwards;
+ -webkit-animation-duration: 1s;
+ -webkit-animation-name: green;
+}
+#test2 {
+ -webkit-animation-fill-mode: forwards;
+ -webkit-animation-duration: 1s;
+}
+#test3 {
+ -webkit-animation-fill-mode: forwards;
+ -webkit-animation-duration: 1s;
+ -webkit-animation-name: notredorgreen;
+}
+@-webkit-keyframes green {
+ from {
+ background-color: white;
+ }
+ to {
+ background-color: green;
+ }
+}
+@-webkit-keyframes red {
+ from {
+ background-color: white;
+ }
+ to {
+ background-color: red;
+ }
+}
+</style>
+Tests that an animation does not run when it specifies an incorrect name.
+<div id="result">FAIL - nothing happened</div>
+<div id="test1"></div>
+<div id="test2"></div>
+<div id="test3"></div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+var pass = true;
+test1.addEventListener('webkitAnimationStart', function() {
+ test2.style.webkitAnimationName = 'green';
+});
+test2.addEventListener('webkitAnimationStart', function() {
+ result.innerText = pass ? 'PASS' : 'FAIL';
+ if (window.testRunner)
+ testRunner.notifyDone();
+});
+test3.addEventListener('webkitAnimationStart', function() {
+ pass = false;
+});
+</script>
« no previous file with comments | « LayoutTests/animations/transition-and-animation-3.html ('k') | LayoutTests/animations/wrong-keyframe-name-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698