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

Unified Diff: LayoutTests/fast/css/style-scoped/style-scoped-keyframes.html

Issue 317143002: Revert of Remove scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/fast/css/style-scoped/style-scoped-keyframes.html
diff --git a/LayoutTests/fast/css/style-scoped/style-scoped-keyframes.html b/LayoutTests/fast/css/style-scoped/style-scoped-keyframes.html
new file mode 100644
index 0000000000000000000000000000000000000000..1cfa70b6af6919ca8638991559080a62f6334239
--- /dev/null
+++ b/LayoutTests/fast/css/style-scoped/style-scoped-keyframes.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<html>
+<head>
+<style>
+#box {
+ position: absolute;
+ left: 0;
+ top: 100px;
+ height: 100px;
+ width: 100px;
+ background: red;
+ -webkit-animation-duration: 1s;
+ -webkit-animation-timing-function: linear;
+ -webkit-animation-name: "anim";
+}
+</style>
+<script src="../../../animations/resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+</head>
+<body>
+ <div>
+ <style scoped>
+ @-webkit-keyframes "anim" {
+ from { left: 100px; }
+ to { left: 100px; }
+ }
+ </style>
+ <div>
+ <style scoped>
+ @-webkit-keyframes "anim" {
+ from { left: 200px; }
+ to { left: 200px; }
+ }
+ </style>
+ <div id="d1">
+ <style scoped>
+ @-webkit-keyframes "anim" {
+ from { left: 300px; }
+ to { left: 300px; }
+ }
+ </style>
+ </div>
+ </div>
+ </div>
+ <div id="result">
+ </div>
+<script>
+var d1 = document.querySelector("#d1");
+var box = document.createElement('div');
+box.id = "box";
+d1.appendChild(box);
+
+const expectedValues = [
+ // [time, element-id, property, expected-value, tolerance]
+ [0.5, "box", "left", 300, 0],
+];
+
+runAnimationTest(expectedValues);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698