Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: LayoutTests/fast/css/css-escaped-identifier.html

Issue 230173005: Fix for ASSERT and more with bad CSS input. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@CHR-1552
Patch Set: ParseURI: Now with enum instead of bool. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSTokenizer-in.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <!-- The testcase input --> 3 <!-- The testcase input -->
4 <style> 4 <style>
5 d\eeeex {} 5 d\eeeex {}
6 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); }
7 </style> 9 </style>
8 10
9 <script src="../../resources/testharness.js"></script> 11 <script src="../../resources/testharness.js"></script>
10 <script src="../../resources/testharnessreport.js"></script> 12 <script src="../../resources/testharnessreport.js"></script>
11 13
12 <script> 14 <script>
13 test(function() { 15 test(function() {
14 var styleElm = document.getElementsByTagName("style")[0]; 16 var styleElm = document.getElementsByTagName("style")[0];
15 assert_not_equals(styleElm, null, "Style element exists"); 17 assert_not_equals(styleElm, null, "Style element exists");
16 var stylesheet = styleElm.sheet; 18 var stylesheet = styleElm.sheet;
17 assert_not_equals(stylesheet, undefined, "style.sheet exists"); 19 assert_not_equals(stylesheet, undefined, "style.sheet exists");
18 rules = stylesheet.cssRules; 20 rules = stylesheet.cssRules;
19 assert_equals(rules.length, 2, "cssRules.length == 2"); 21 assert_equals(rules.length, 4, "cssRules.length == 4");
20 assert_equals(rules[0].selectorText, "d\ueeeex", "Lowercase identifi er with escapes"); 22 assert_equals(rules[0].selectorText, "d\ueeeex", "Lowercase identifi er with escapes");
21 assert_equals(rules[1].selectorText, "d\ueeeex", "Uppercase identifi er with escapes"); 23 assert_equals(rules[1].selectorText, "d\ueeeex", "Uppercase identifi er with escapes");
24 assert_equals(rules[2].style.cssText, "background-image: url(http:// w/%EA%AA%AA/1b%EA%AA%AA.gif);", "Escaped url string");
25 assert_equals(rules[3].style.cssText, "background-image: url(http:// w/%EA%AA%AA/1b%EA%AA%AA.gif);", "Escaped url without string");
22 }, "Correctly parsed identifier with escapes"); 26 }, "Correctly parsed identifier with escapes");
23 </script> 27 </script>
24 </head> 28 </head>
25 <body><!-- Intentionally left empty --></body> 29 <body><!-- Intentionally left empty --></body>
26 </html> 30 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSTokenizer-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698