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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/preferred-stylesheet-order.html

Issue 1769843002: Added tests for preferred sheet insertion order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/preferred-stylesheet-order-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/css/preferred-stylesheet-order.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/preferred-stylesheet-order.html b/third_party/WebKit/LayoutTests/fast/css/preferred-stylesheet-order.html
new file mode 100644
index 0000000000000000000000000000000000000000..b28225ee8b35ef3a86cc278d125270b5f3015f99
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/preferred-stylesheet-order.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<div id="t1">This text should be green</div>
+<script>
+description("Preferred stylesheet where insertion order is reversed tree order");
+
+function createStyleElement(text, title) {
+ var elm = document.createElement("style");
+ elm.setAttribute("title", title);
+ elm.appendChild(document.createTextNode(text));
+ return elm;
+}
+
+document.head.appendChild(createStyleElement("#t1 {color:green}", "preferred"));
+document.head.appendChild(createStyleElement("#t1 {color:red}", "notpreferred"));
+
+shouldBeEqualToString("getComputedStyle(t1).color", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.preferredStylesheetSet", "preferred");
+shouldBeEqualToString("document.selectedStylesheetSet", "preferred");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/preferred-stylesheet-order-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698