summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/url-with-multi-byte-unicode-escape.html
blob: ad272f9003b4b0e584ac2d43ac05ee49c126aedc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
<head>
<style>#test { background-image: url("data:\100")} #test { background-color: green !important }</style>
<script src="../js/resources/js-test-pre.js"></script>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();
</script>
</head>
<body>
<div id="test" style="width: 100px; height: 100px; background-color: red"></div>
<script>
    description('Test parsing a CSS URI containing a multi-byte Unicode escape sequence.');
    shouldBe('document.styleSheets[0].cssRules.length', '2');
    shouldBeEqualToString('document.styleSheets[0].cssRules[0].style.getPropertyValue("background-image")', 'url(data:%C4%80)');
    shouldBeEqualToString('document.styleSheets[0].cssRules[1].style.getPropertyValue("background-color")', 'green');
    shouldBeEqualToString('window.getComputedStyle(document.getElementById("test")).getPropertyValue("background-color")', 'rgb(0, 128, 0)');
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>