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

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

Issue 216543002: Revert of Remove applyAuthorStyles flag from ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/dom/shadow/shadowroot-keyframes.html
diff --git a/LayoutTests/fast/dom/shadow/shadowroot-keyframes.html b/LayoutTests/fast/dom/shadow/shadowroot-keyframes.html
index a478a5f23b64100b5651101d2bb6489c4036477f..f1ce45e1adafb13e1f756ffd0db0815e1a910c57 100644
--- a/LayoutTests/fast/dom/shadow/shadowroot-keyframes.html
+++ b/LayoutTests/fast/dom/shadow/shadowroot-keyframes.html
@@ -16,6 +16,7 @@
<body>
<div id="d1"></div>
<div id="d2"></div>
+ <div id="d3"></div>
<div id="result"></div>
<script>
if (window.testRunner)
@@ -33,7 +34,15 @@
'<div id="box"></div>';
var shadowRootWithoutKeyframe = document.getElementById("d2").createShadowRoot();
+shadowRootWithoutKeyframe.applyAuthorStyles = false;
shadowRootWithoutKeyframe.innerHTML = '<style>' +
+ '#box { height: 100px; width: 100px; background: red; ' +
+ '-webkit-animation: "anim" 0.5s both; }</style>' +
+ '<div id="box"></div>';
+
+var shadowRootWithApplyAuthorStyles = document.getElementById("d3").createShadowRoot();
+shadowRootWithApplyAuthorStyles.applyAuthorStyles = true;
+shadowRootWithApplyAuthorStyles.innerHTML = '<style>' +
'#box { height: 100px; width: 100px; background: red; ' +
'-webkit-animation: "anim" 0.5s both; }</style>' +
'<div id="box"></div>';
@@ -41,6 +50,7 @@
window.setTimeout(function() {
shouldBe("getBackgroundColor(shadowRootWithKeyframe.getElementById('box'))", '"rgb(0, 0, 255)"');
shouldBe("getBackgroundColor(shadowRootWithoutKeyframe.getElementById('box'))", '"rgb(255, 0, 0)"');
+ shouldBe("getBackgroundColor(shadowRootWithApplyAuthorStyles.getElementById('box'))", '"rgb(0, 128, 0)"');
if (window.testRunner)
testRunner.notifyDone();
}, 1000);

Powered by Google App Engine
This is Rietveld 408576698