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

Unified Diff: LayoutTests/fast/css/css-namespace-rule.html

Issue 1321943002: Support for CSSOM CSSNamespaceRule interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating testcases Created 5 years, 4 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/css/css-namespace-rule.html
diff --git a/LayoutTests/fast/css/css-namespace-rule.html b/LayoutTests/fast/css/css-namespace-rule.html
new file mode 100644
index 0000000000000000000000000000000000000000..605aba3b977efe5cbbd7ffc5b43aad7cb9f89ac2
--- /dev/null
+++ b/LayoutTests/fast/css/css-namespace-rule.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style id="style1">
+@namespace my-namespace url(http://www.w3.org/1999/xhtml);
+body {
+ color:black;
+}
+my-namespace|body {
+ color:red;
+}
+</style>
+Here is some text!
+<script>
+description('Check the basic attribute support of CSSOM CSSNamespaceRule');
+
+shouldBe('CSSRule.NAMESPACE_RULE','10');
+var namespacerule = document.getElementById("style1").sheet.cssRules[0];
+shouldBe('namespacerule.type','10');
+shouldBeEqualToString('namespacerule.namespaceURI','http://www.w3.org/1999/xhtml');
+shouldBeEqualToString('namespacerule.prefix','my-namespace');
+shouldBeEqualToString('namespacerule.cssText','@namespace my-namespace url("http://www.w3.org/1999/xhtml");');
+shouldBeEqualToString('getComputedStyle(document.body).color', 'rgb(255, 0, 0)');
+</script>

Powered by Google App Engine
This is Rietveld 408576698