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

Unified Diff: LayoutTests/fast/dom/shadow/shadowhost-keyframes.html

Issue 137583005: resolveScopedKeyframesRules should check @keyframes declared in shadow trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added layout test Created 6 years, 11 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 | LayoutTests/fast/dom/shadow/shadowhost-keyframes-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/shadow/shadowhost-keyframes.html
diff --git a/LayoutTests/fast/dom/shadow/shadowhost-keyframes.html b/LayoutTests/fast/dom/shadow/shadowhost-keyframes.html
new file mode 100644
index 0000000000000000000000000000000000000000..b77cbd4a4e20c9ecae9af202ae7662fc6e41cdd5
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/shadowhost-keyframes.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<html>
+<head>
+<style>
+@-webkit-keyframes anim {
+ from {
+ background-color: red;
+ }
+ to {
+ background-color: green;
+ }
+}
+</style>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+ <div id="host"></div>
+ <div id="result"></div>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function getColor(element) {
+ return window.getComputedStyle(element).color;
+}
+
+description('Test if @keyframes works for shadow host when using :host. i.e. crbug.com/332577');
+
+var host = document.getElementById('host');
+var sr = host.createShadowRoot();
+sr.innerHTML = '<style>@-webkit-keyframes anim {'
+ + 'from { color: red; } to { color: green; } }'
+ + ':host { -webkit-animation: anim 0.5s both; color: red; }</style>'
+ + 'I should become green';
+
+window.setTimeout(function() {
+ shouldBe("getColor(document.getElementById('host'))", '"rgb(0, 128, 0)"');
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, 1000);
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/shadowhost-keyframes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698