Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / css-escaped-identifier.html
blobe73841352441bc264df37ea08e9901a519650fe5
1 <html>
2 <head>
3 <!-- The testcase input -->
4 <style>
5 d\eeeex {}
6 D\eeeeX {}
7 x { background-image: url('http://w/\aaaa/1b\aaaa.gif'); }
8 y { background-image: url(http://w/\aaaa/1b\aaaa.gif); }
9 </style>
11 <script src="../../resources/testharness.js"></script>
12 <script src="../../resources/testharnessreport.js"></script>
14 <script>
15 test(function() {
16 var styleElm = document.getElementsByTagName("style")[0];
17 assert_not_equals(styleElm, null, "Style element exists");
18 var stylesheet = styleElm.sheet;
19 assert_not_equals(stylesheet, undefined, "style.sheet exists");
20 rules = stylesheet.cssRules;
21 assert_equals(rules.length, 4, "cssRules.length == 4");
22 assert_equals(rules[0].selectorText, "d\ueeeex", "Lowercase identifier with escapes");
23 assert_equals(rules[1].selectorText, "d\ueeeex", "Uppercase identifier with escapes");
24 assert_equals(rules[2].style.cssText, "background-image: url(http://w/" + decodeURIComponent("%EA%AA%AA") + "/1b" + decodeURIComponent("%EA%AA%AA") + ".gif);", "Escaped url string");
25 assert_equals(rules[3].style.cssText, "background-image: url(http://w/" + decodeURIComponent("%EA%AA%AA") + "/1b" + decodeURIComponent("%EA%AA%AA") + ".gif);", "Escaped url without string");
26 }, "Correctly parsed identifier with escapes");
27 </script>
28 </head>
29 <body><!-- Intentionally left empty --></body>
30 </html>