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

Unified Diff: third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector.html

Issue 1394663003: Support deeply nested uncommonAttributeSelectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector.html
diff --git a/third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector.html b/third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector.html
new file mode 100644
index 0000000000000000000000000000000000000000..8a5354ba8be63400c13bf90c244b93bedb9aa828
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+ #t1 > :-webkit-any(:not([myattr])) { color: green }
+</style>
+<div id="t1">
+ <div myattr>This text should be black</div>
+ <div>This text should be green</div>
+</div>
+<script>
+description("Style sharing based on attribute selectors");
+
+var black = "rgb(0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+
+debug("Attribute selector in nested functional syntax");
+
+var firstDiv = t1.querySelector("div");
+var secondDiv = t1.querySelector("div+div");
+
+shouldBe("getComputedStyle(firstDiv).color", "black");
+shouldBe("getComputedStyle(secondDiv).color", "green");
+if (window.internals)
+ shouldBeFalse("internals.isSharingStyle(firstDiv, secondDiv)");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/selectors/style-sharing-attribute-selector-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698