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>
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>
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�; }
25 <div style=
"display: none">
31 <div id=
"a-ref"></div>
32 <div id=
"b-ref"></div>
33 <div id=
"c-ref"></div>
34 <div id=
"d-ref"></div>
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");
48 assert_equals(window
.getComputedStyle(a
, ":before").content
,
49 window
.getComputedStyle(a_ref
, ":before").content
);
50 }, "test backslash before EOF inside a string");
53 assert_equals(window
.getComputedStyle(b
).backgroundImage
,
54 window
.getComputedStyle(b_ref
).backgroundImage
);
55 }, "test backslash before EOF inside a url(\"\")");
58 assert_equals(window
.getComputedStyle(c
).backgroundImage
,
59 window
.getComputedStyle(c_ref
).backgroundImage
);
60 }, "test backslash before EOF inside a url()");
63 assert_equals(window
.getComputedStyle(d
).counterReset
,
64 window
.getComputedStyle(d_ref
).counterReset
);
65 }, "test backslash before EOF outside a string");