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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSTokenizer-in.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/css-escaped-identifier.html
diff --git a/LayoutTests/fast/css/css-escaped-identifier.html b/LayoutTests/fast/css/css-escaped-identifier.html
index 87bf7548d1f18193624116584f9aaf5c64523641..c2e1190945e08188ca7aab73cc274f72b61f3a33 100644
--- a/LayoutTests/fast/css/css-escaped-identifier.html
+++ b/LayoutTests/fast/css/css-escaped-identifier.html
@@ -4,6 +4,8 @@
<style>
d\eeeex {}
D\eeeeX {}
+ x { background-image: url('http://w/\aaaa/1b\aaaa.gif'); }
+ y { background-image: url(http://w/\aaaa/1b\aaaa.gif); }
</style>
<script src="../../resources/testharness.js"></script>
@@ -16,9 +18,11 @@
var stylesheet = styleElm.sheet;
assert_not_equals(stylesheet, undefined, "style.sheet exists");
rules = stylesheet.cssRules;
- assert_equals(rules.length, 2, "cssRules.length == 2");
+ assert_equals(rules.length, 4, "cssRules.length == 4");
assert_equals(rules[0].selectorText, "d\ueeeex", "Lowercase identifier with escapes");
assert_equals(rules[1].selectorText, "d\ueeeex", "Uppercase identifier with escapes");
+ assert_equals(rules[2].style.cssText, "background-image: url(http://w/%EA%AA%AA/1b%EA%AA%AA.gif);", "Escaped url string");
+ assert_equals(rules[3].style.cssText, "background-image: url(http://w/%EA%AA%AA/1b%EA%AA%AA.gif);", "Escaped url without string");
}, "Correctly parsed identifier with escapes");
</script>
</head>
« 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