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

Unified Diff: LayoutTests/fast/css/style-sharing-type-and-readonly.html

Issue 27033011: Fix readonly and type attribute selector incorrect style sharing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix for svg Created 7 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 | LayoutTests/fast/css/style-sharing-type-and-readonly-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/style-sharing-type-and-readonly.html
diff --git a/LayoutTests/fast/css/style-sharing-type-and-readonly.html b/LayoutTests/fast/css/style-sharing-type-and-readonly.html
new file mode 100644
index 0000000000000000000000000000000000000000..3b95b0e971fd410680f25c1a2a597c863d1ff9d0
--- /dev/null
+++ b/LayoutTests/fast/css/style-sharing-type-and-readonly.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+
+<script src="../js/resources/js-test-pre.js"></script>
+
+<style>
+ div[readonly="red"] {
+ color: red;
+ }
+ div[type="blue"] {
+ color: blue;
+ }
+</style>
+
+<div black>Black</div>
+<div readonly="red">Red</div>
+<div type="blue">Blue</div>
+
+<script>
+description("Make sure special case style sharing for readonly and type attributes works");
+
+shouldBe('getComputedStyle(document.querySelector("[black]")).color','"rgb(0, 0, 0)"');
+shouldBe('getComputedStyle(document.querySelector("[readonly]")).color','"rgb(255, 0, 0)"');
+shouldBe('getComputedStyle(document.querySelector("[type]")).color','"rgb(0, 0, 255)"');
+</script>
+
+<script src="../js/resources/js-test-post.js"></script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/style-sharing-type-and-readonly-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698