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

Unified Diff: LayoutTests/animations/keyframe-rule-negative-selector-percentage.html

Issue 13943004: Avoid reparsing keyframe selectors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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/keyframe-rule-negative-selector-percentage.html
diff --git a/LayoutTests/animations/keyframe-rule-negative-selector-percentage.html b/LayoutTests/animations/keyframe-rule-negative-selector-percentage.html
new file mode 100644
index 0000000000000000000000000000000000000000..f67cc4dba27bbe88b6c752be3d1db8faec9fa111
--- /dev/null
+++ b/LayoutTests/animations/keyframe-rule-negative-selector-percentage.html
@@ -0,0 +1,68 @@
+<html>
+ <head>
+ <script src="../fast/js/resources/js-test-pre.js"></script>
+ <style type="text/css">
+ @-webkit-keyframes animation {
+ -100% {
+ top: 100px;
+ -webkit-animation-timing-function: ease-out;
+ }
+
+ 70% {
+ top: 50px;
+ -webkit-animation-timing-function: ease-in;
+ }
+
+ -50% {
+ top: 100px;
+ -webkit-animation-timing-function: ease-out;
+ }
+
+ 25% {
+ top: 75px;
+ -webkit-animation-timing-function: ease-in;
+ }
+
+ 10%, -20% {
+ top: 75px;
+ -webkit-animation-timing-function: ease-in;
+ }
+
+ from {
+ top: 100px;
+ }
+ }
+
+ div.animation {
+ background-color: green;
+ width: 50px;
+ height: 50px;
+ margin: 20px;
+ position: relative;
+ -webkit-animation-duration: 0.5s;
+ -webkit-animation-timing-function: linear;
+ -webkit-animation-name: "animation";
+
+ }
+ </style>
+ </head>
+ <body>
+ <div class="animation"/>
+ <script type="text/javascript">
+ description("This test verifies that keyframe rule is ignored whenever keyframe selectors have invalid value.");
+ shouldBeFalse("hasKeyframesRule()");
+ function hasKeyframesRule()
+ {
+ var ss = document.styleSheets;
+ for (var i = 0; i < ss.length; ++i) {
+ for (var j = 0; j < ss[i].cssRules.length; ++j) {
+ if (ss[i].cssRules[j].type == window.CSSRule.WEBKIT_KEYFRAMES_RULE)
+ return true;
+ }
+ }
+ return false;
+ }
+ </script>
+ <script src="../fast/js/resources/js-test-post.js"></script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698