OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <style id='style'> | 5 <style id='style'> |
6 #A::after { content: 'A'; } | 6 #A::after { content: 'A'; } |
7 #B::after { content: '\'B\''; } | 7 #B::after { content: '\'B\''; } |
8 #C::after { content: '\'C\''; } | 8 #C::after { content: '\'C\''; } |
9 #D::after { content: '\'D\'' url(http://example.com/) 'EFG'; } | 9 #D::after { content: '\'D\'' url(http://example.com/) 'EFG'; } |
10 </style> | 10 </style> |
11 </head> | 11 </head> |
12 <body> | 12 <body> |
13 <div id='A'></div> | 13 <div id='A'></div> |
14 <div id='B'></div> | 14 <div id='B'></div> |
15 <div id='C'></div> | 15 <div id='C'></div> |
16 <div id='D'></div> | 16 <div id='D'></div> |
17 <pre id='console'></pre> | 17 <pre id='console'></pre> |
18 </body> | 18 </body> |
19 <script> | 19 <script> |
20 description('Tests if a css text of content value is quoted when the value is st
ring.'); | 20 description('Tests if a css text of content value is quoted when the value is st
ring.'); |
21 | 21 |
22 var style = document.getElementById('style'); | 22 var style = document.getElementById('style'); |
23 shouldBeEqualToString("style.sheet.cssRules[0].cssText", "#A::after { content: '
A'; }"); | 23 shouldBeEqualToString("style.sheet.cssRules[0].cssText", "#A::after { content: \
"A\"; }"); |
24 shouldBeEqualToString("style.sheet.cssRules[1].cssText", "#B::after { content: '
\\'B\\''; }"); | 24 shouldBeEqualToString("style.sheet.cssRules[1].cssText", "#B::after { content: \
"'B'\"; }"); |
25 shouldBeEqualToString("style.sheet.cssRules[2].cssText", "#C::after { content: '
\\'C\\8\\''; }"); | 25 shouldBeEqualToString("style.sheet.cssRules[2].cssText", "#C::after { content: \
"'C\\8 '\"; }"); |
26 shouldBeEqualToString("style.sheet.cssRules[3].cssText", "#D::after { content: '
\\'D\\'' url(http://example.com/) 'EFG'; }"); | 26 shouldBeEqualToString("style.sheet.cssRules[3].cssText", "#D::after { content: \
"'D'\" url(http://example.com/) \"EFG\"; }"); |
27 </script> | 27 </script> |
28 </html> | 28 </html> |
OLD | NEW |