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

Unified Diff: LayoutTests/fast/css/csstext-of-content-string.html

Issue 16736004: Stylesheet rule.cssText of content property should be quoted when the value is string. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/csstext-of-content-string-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/csstext-of-content-string.html
diff --git a/LayoutTests/fast/css/csstext-of-content-string.html b/LayoutTests/fast/css/csstext-of-content-string.html
new file mode 100644
index 0000000000000000000000000000000000000000..27e0c22f42d4e8edd81b2d197b1d4d20e8ede6b1
--- /dev/null
+++ b/LayoutTests/fast/css/csstext-of-content-string.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+<style id='style'>
+#A::after { content: 'A'; }
+#B::after { content: '\'B\''; }
+#C::after { content: '\'C\''; }
+#D::after { content: '\'D\'' url(http://example.com/) 'EFG'; }
+</style>
+</head>
+<body>
+ <div id='A'></div>
+ <div id='B'></div>
+ <div id='C'></div>
+ <div id='D'></div>
+ <pre id='console'></pre>
+</body>
+<script>
+description('Tests if a css text of content value is quoted when the value is string.');
+
+var style = document.getElementById('style');
+shouldBeEqualToString("style.sheet.cssRules[0].cssText", "#A::after { content: 'A'; }");
+shouldBeEqualToString("style.sheet.cssRules[1].cssText", "#B::after { content: '\\'B\\''; }");
+shouldBeEqualToString("style.sheet.cssRules[2].cssText", "#C::after { content: '\\'C\\8\\''; }");
+shouldBeEqualToString("style.sheet.cssRules[3].cssText", "#D::after { content: '\\'D\\'', url(http://example.com/), 'EFG'; }");
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/css/csstext-of-content-string-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698