Backed out changeset 2fc34d798e24 (bug 1917771) for causing failures at baseline...
[gecko.git] / layout / style / test / test_parse_eof.html
blob63ef95b980393bf47c3fa127156ad8c31160bb79
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset=utf-8>
5 <title>Test parsing behaviour of backslash just before EOF</title>
6 <link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
7 <meta name="flags" content="">
8 <script src="/resources/testharness.js"></script>
9 <script src="/resources/testharnessreport.js"></script>
10 </head>
11 <body>
13 <style>#a::before { content: "ab\</style>
14 <style>#b { background-image: url("ab\</style>
15 <style>#c { background-image: url(ab\</style>
16 <style>#d { counter-reset: ab\</style>
18 <style>
19 #a-ref::before { content: "ab"; }
20 #b-ref { background-image: url("ab"); }
21 #c-ref { background-image: url(ab�); }
22 #d-ref { counter-reset: ab�; }
23 </style>
25 <div style="display: none">
26 <div id="a"></div>
27 <div id="b"></div>
28 <div id="c"></div>
29 <div id="d"></div>
31 <div id="a-ref"></div>
32 <div id="b-ref"></div>
33 <div id="c-ref"></div>
34 <div id="d-ref"></div>
35 </div>
37 <script>
38 var a = document.getElementById("a");
39 var b = document.getElementById("b");
40 var c = document.getElementById("c");
41 var d = document.getElementById("d");
42 var a_ref = document.getElementById("a-ref");
43 var b_ref = document.getElementById("b-ref");
44 var c_ref = document.getElementById("c-ref");
45 var d_ref = document.getElementById("d-ref");
47 test(function() {
48 assert_equals(window.getComputedStyle(a, ":before").content,
49 window.getComputedStyle(a_ref, ":before").content);
50 }, "test backslash before EOF inside a string");
52 test(function() {
53 assert_equals(window.getComputedStyle(b).backgroundImage,
54 window.getComputedStyle(b_ref).backgroundImage);
55 }, "test backslash before EOF inside a url(\"\")");
57 test(function() {
58 assert_equals(window.getComputedStyle(c).backgroundImage,
59 window.getComputedStyle(c_ref).backgroundImage);
60 }, "test backslash before EOF inside a url()");
62 test(function() {
63 assert_equals(window.getComputedStyle(d).counterReset,
64 window.getComputedStyle(d_ref).counterReset);
65 }, "test backslash before EOF outside a string");
66 </script>
68 </body>
69 </html>