blob: 8295da96250bcb17898502878d3c5bef6d6a9063 [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../../resources/js-test.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>
</html>