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

Unified Diff: LayoutTests/fast/dom/shadow/content-pseudo-element-overridden.html

Issue 205563004: Revert of Implement /content/ combinator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict 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/content-pseudo-element-overridden.html
diff --git a/LayoutTests/fast/dom/shadow/content-combinator-with-host-pseudo-class.html b/LayoutTests/fast/dom/shadow/content-pseudo-element-overridden.html
similarity index 53%
copy from LayoutTests/fast/dom/shadow/content-combinator-with-host-pseudo-class.html
copy to LayoutTests/fast/dom/shadow/content-pseudo-element-overridden.html
index 735c404279f63dd78dc957fe35c3fd6f891eb038..7ef8cd5a7d65e9fbb45fa6efb8560565196f9332 100644
--- a/LayoutTests/fast/dom/shadow/content-combinator-with-host-pseudo-class.html
+++ b/LayoutTests/fast/dom/shadow/content-pseudo-element-overridden.html
@@ -1,40 +1,38 @@
<!doctype html>
<html>
<head>
-<script src="resources/shadow-dom.js"></script>
<script src="../../../resources/js-test.js"></script>
+<style>
+ .contentClass {
+ color: blue;
+ }
+</style>
</head>
<body class="bodyClass">
<template id="tmpl">
<style>
- :host > .blue {
- color: blue;
- }
- :host content /content/ * {
+ ::content > * {
color: red;
}
</style>
- <div class="blue">I am blue!</div>
<content></content>
</template>
<div id="host" class="hostClass">
- <div class="content">
+ <div class="contentClass">
content
</div>
</div>
- <pre id="console"></pre>
+ <pre id='console'></pre>
</body>
<script>
-description("Test for crbug.com/274063, cannot style /content/ with a rule that includes :host.");
-
+description('Test for crbug.com/274059. Should be able to override ::content styles in shadow root style sheet from the document.');
var host = document.querySelector('#host');
var root = host.createShadowRoot();
var template = document.querySelector('#tmpl');
root.appendChild(template.content);
-
-shouldBe('window.getComputedStyle(document.querySelector("#host > .content")).color', '"rgb(255, 0, 0)"');
+shouldBe('window.getComputedStyle(document.querySelector(".contentClass")).color', '"rgb(0, 0, 255)"');
</script>
</html>

Powered by Google App Engine
This is Rietveld 408576698