Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <meta charset=utf-8> |
michael@0 | 5 | <title>Test parsing behaviour of backslash just before EOF</title> |
michael@0 | 6 | <link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"> |
michael@0 | 7 | <meta name="flags" content=""> |
michael@0 | 8 | <script src="/resources/testharness.js"></script> |
michael@0 | 9 | <script src="/resources/testharnessreport.js"></script> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | |
michael@0 | 13 | <style>#a::before { content: "ab\</style> |
michael@0 | 14 | <style>#b { background-image: url("ab\</style> |
michael@0 | 15 | <style>#c { background-image: url(ab\</style> |
michael@0 | 16 | <style>#d { counter-reset: ab\</style> |
michael@0 | 17 | |
michael@0 | 18 | <style> |
michael@0 | 19 | #a-ref::before { content: "ab"; } |
michael@0 | 20 | #b-ref { background-image: url("ab"); } |
michael@0 | 21 | #c-ref { background-image: url(ab�); } |
michael@0 | 22 | #d-ref { counter-reset: ab�; } |
michael@0 | 23 | </style> |
michael@0 | 24 | |
michael@0 | 25 | <div style="display: none"> |
michael@0 | 26 | <div id="a"></div> |
michael@0 | 27 | <div id="b"></div> |
michael@0 | 28 | <div id="c"></div> |
michael@0 | 29 | <div id="d"></div> |
michael@0 | 30 | |
michael@0 | 31 | <div id="a-ref"></div> |
michael@0 | 32 | <div id="b-ref"></div> |
michael@0 | 33 | <div id="c-ref"></div> |
michael@0 | 34 | <div id="d-ref"></div> |
michael@0 | 35 | </div> |
michael@0 | 36 | |
michael@0 | 37 | <script> |
michael@0 | 38 | var a = document.getElementById("a"); |
michael@0 | 39 | var b = document.getElementById("b"); |
michael@0 | 40 | var c = document.getElementById("c"); |
michael@0 | 41 | var d = document.getElementById("d"); |
michael@0 | 42 | var a_ref = document.getElementById("a-ref"); |
michael@0 | 43 | var b_ref = document.getElementById("b-ref"); |
michael@0 | 44 | var c_ref = document.getElementById("c-ref"); |
michael@0 | 45 | var d_ref = document.getElementById("d-ref"); |
michael@0 | 46 | |
michael@0 | 47 | test(function() { |
michael@0 | 48 | assert_equals(window.getComputedStyle(a, ":before").content, |
michael@0 | 49 | window.getComputedStyle(a_ref, ":before").content); |
michael@0 | 50 | }, "test backslash before EOF inside a string"); |
michael@0 | 51 | |
michael@0 | 52 | test(function() { |
michael@0 | 53 | assert_equals(window.getComputedStyle(b, "").backgroundImage, |
michael@0 | 54 | window.getComputedStyle(b_ref, "").backgroundImage); |
michael@0 | 55 | }, "test backslash before EOF inside a url(\"\")"); |
michael@0 | 56 | |
michael@0 | 57 | test(function() { |
michael@0 | 58 | assert_equals(window.getComputedStyle(c, "").backgroundImage, |
michael@0 | 59 | window.getComputedStyle(c_ref, "").backgroundImage); |
michael@0 | 60 | }, "test backslash before EOF inside a url()"); |
michael@0 | 61 | |
michael@0 | 62 | test(function() { |
michael@0 | 63 | assert_equals(window.getComputedStyle(d, "").counterReset, |
michael@0 | 64 | window.getComputedStyle(d_ref, "").counterReset); |
michael@0 | 65 | }, "test backslash before EOF outside a string"); |
michael@0 | 66 | </script> |
michael@0 | 67 | |
michael@0 | 68 | </body> |
michael@0 | 69 | </html> |