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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/script-tests/string-quote-binary.js

Issue 1778743003: Make <custom-ident> not insert quotes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win_chromium_rel_ng Created 4 years, 9 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
OLDNEW
1 description( 1 description(
2 'This test checks if CSS string values are correctly serialized when they contai n binary characters.' 2 'This test checks if CSS string values are correctly serialized when they contai n binary characters.'
3 ); 3 );
4 4
5 var inputs = ["'\\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\a\\b\\c\\d\\e\\f'", 5 var inputs = ["'\\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\a\\b\\c\\d\\e\\f'",
6 "'\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f \\7f'", 6 "'\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f \\7f'",
7 "'\\A\\B\\C\\D\\E\\F\\1A\\1B\\1C\\1D\\1E\\1F\\7F'", 7 "'\\A\\B\\C\\D\\E\\F\\1A\\1B\\1C\\1D\\1E\\1F\\7F'",
8 "'\\3 \\1 \\2 '", 8 "'\\3 \\1 \\2 '",
9 "'\\3 \\1 \\2 '", 9 "'\\3 \\1 \\2 '",
10 "'\\3 \\1 \\2 '", 10 "'\\3 \\1 \\2 '",
11 "'\\00000f\\00000g'", 11 "'\\00000f\\00000g'",
12 "'\\1 0\\1 1\\1 2\\1 3\\1 4\\1 5\\1 6\\1 7\\1 8\\1 9'", 12 "'\\1 0\\1 1\\1 2\\1 3\\1 4\\1 5\\1 6\\1 7\\1 8\\1 9'",
13 "'\\1 A\\1 B\\1 C\\1 D\\1 E\\1 F\\1 G'", 13 "'\\1 A\\1 B\\1 C\\1 D\\1 E\\1 F\\1 G'",
14 "'\\1 a\\1 b\\1 c\\1 d\\1 e\\1 f\\1 g'"]; 14 "'\\1 a\\1 b\\1 c\\1 d\\1 e\\1 f\\1 g'"];
15 // Null is replaced with U+FFFD as per css-syntax 15 // Null is replaced with U+FFFD as per css-syntax
16 var expected = ["'\uFFFD\\1\\2\\3\\4\\5\\6\\7\\8\\9\\a\\b\\c\\d\\e\\f'", 16 var expected = ["\"\uFFFD\\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \\a \\b \\c \\d \\e \\f \"",
17 "'\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\ 1f\\7f'", 17 "\"\\10 \\11 \\12 \\13 \\14 \\15 \\16 \\17 \\18 \\19 \\1a \\1b \ \1c \\1d \\1e \\1f \\7f \"",
18 "'\\a\\b\\c\\d\\e\\f\\1a\\1b\\1c\\1d\\1e\\1f\\7f'", 18 "\"\\a \\b \\c \\d \\e \\f \\1a \\1b \\1c \\1d \\1e \\1f \\7f \" ",
19 "'\\3\\1\\2'", // No space after each control character . 19 "\"\\3 \\1 \\2 \"", // No space after each control char acter.
20 "'\\3 \\1 \\2 '", // One space delimiter (that will be ign ored by the CSS parser), plus one actual space. 20 "\"\\3 \\1 \\2 \"", // One space delimiter (that will be i gnored by the CSS parser), plus one actual space.
21 "'\\3 \\1 \\2 '", // One space delimiter, plus two actual spaces. 21 "\"\\3 \\1 \\2 \"", // One space delimiter, plus two actua l spaces.
22 "'\\f\uFFFDg'", 22 "\"\\f \uFFFDg\"",
23 "'\\1 0\\1 1\\1 2\\1 3\\1 4\\1 5\\1 6\\1 7\\1 8\\1 9'", // Need a space before [0-9A-Fa-f], but not before [Gg]. 23 "\"\\1 0\\1 1\\1 2\\1 3\\1 4\\1 5\\1 6\\1 7\\1 8\\1 9\"", // Nee d a space before [0-9A-Fa-f], but not before [Gg].
24 "'\\1 A\\1 B\\1 C\\1 D\\1 E\\1 F\\1G'", 24 "\"\\1 A\\1 B\\1 C\\1 D\\1 E\\1 F\\1 G\"",
25 "'\\1 a\\1 b\\1 c\\1 d\\1 e\\1 f\\1g'"]; 25 "\"\\1 a\\1 b\\1 c\\1 d\\1 e\\1 f\\1 g\""];
26 26
27 var testElement = document.createElement('div'); 27 var testElement = document.createElement('div');
28 for (var i = 0; i < inputs.length; ++i) { 28 for (var i = 0; i < inputs.length; ++i) {
29 testElement.style.fontFamily = inputs[i]; 29 testElement.style.fontFamily = inputs[i];
30 shouldBeEqualToString('testElement.style.fontFamily', expected[i]); 30 shouldBeEqualToString('testElement.style.fontFamily', expected[i]);
31 } 31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698