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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/stylerule-set-selectortext-ns.html

Issue 1616423003: Fix selector namespace prefix resolution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issues Created 4 years, 11 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: third_party/WebKit/LayoutTests/fast/css/stylerule-set-selectortext-ns.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/stylerule-set-selectortext-ns.html b/third_party/WebKit/LayoutTests/fast/css/stylerule-set-selectortext-ns.html
new file mode 100644
index 0000000000000000000000000000000000000000..baf0b8e588f8d00c3c939d15ebe091eddb22471f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/stylerule-set-selectortext-ns.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style id="testsheet">
+ p { color: green }
+ .nomatch { color: red }
+</style>
+<p>This text should be green</p>
+<script>
+description("Should not be allowed to set selectorText with unknown namespace");
+
+var green = "rgb(0, 128, 0)";
+var p = document.querySelector("p");
+var sheet = document.querySelector("#testsheet").sheet;
+shouldBe("getComputedStyle(p).color", "green");
+
+sheet.cssRules[1].selectorText = "bogus|p";
+
+shouldBeEqualToString("sheet.cssRules[1].selectorText", ".nomatch");
+shouldBe("getComputedStyle(p).color", "green");
+</script>

Powered by Google App Engine
This is Rietveld 408576698