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

Side by Side Diff: LayoutTests/css3/escape-dom-api.html

Issue 1329413003: Add testcase to CSS escape (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | LayoutTests/css3/escape-dom-api-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 // Test from https://github.com/mathiasbynens/CSS.escape 8 // Test from https://github.com/mathiasbynens/CSS.escape
9 description("Test window.CSS.escape()"); 9 description("Test window.CSS.escape()");
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 shouldBeEqualToString("CSS.escape('-2a')", "-\\32 a"); 48 shouldBeEqualToString("CSS.escape('-2a')", "-\\32 a");
49 shouldBeEqualToString("CSS.escape('-3a')", "-\\33 a"); 49 shouldBeEqualToString("CSS.escape('-3a')", "-\\33 a");
50 shouldBeEqualToString("CSS.escape('-4a')", "-\\34 a"); 50 shouldBeEqualToString("CSS.escape('-4a')", "-\\34 a");
51 shouldBeEqualToString("CSS.escape('-5a')", "-\\35 a"); 51 shouldBeEqualToString("CSS.escape('-5a')", "-\\35 a");
52 shouldBeEqualToString("CSS.escape('-6a')", "-\\36 a"); 52 shouldBeEqualToString("CSS.escape('-6a')", "-\\36 a");
53 shouldBeEqualToString("CSS.escape('-7a')", "-\\37 a"); 53 shouldBeEqualToString("CSS.escape('-7a')", "-\\37 a");
54 shouldBeEqualToString("CSS.escape('-8a')", "-\\38 a"); 54 shouldBeEqualToString("CSS.escape('-8a')", "-\\38 a");
55 shouldBeEqualToString("CSS.escape('-9a')", "-\\39 a"); 55 shouldBeEqualToString("CSS.escape('-9a')", "-\\39 a");
56 56
57 shouldBeEqualToString("CSS.escape('-')", "\\-"); 57 shouldBeEqualToString("CSS.escape('-')", "\\-");
58 shouldBeEqualToString("CSS.escape('-a')", "-a");
58 shouldBeEqualToString("CSS.escape('--')", "--"); 59 shouldBeEqualToString("CSS.escape('--')", "--");
59 shouldBeEqualToString("CSS.escape('--a')", "--a"); 60 shouldBeEqualToString("CSS.escape('--a')", "--a");
60 61
61 shouldBeEqualToString("CSS.escape('\x80\x2D\x5F\xA9')", "\x80\x2D\x5F\xA9"); 62 shouldBeEqualToString("CSS.escape('\x80\x2D\x5F\xA9')", "\x80\x2D\x5F\xA9");
62 shouldBeEqualToString("CSS.escape('\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\ x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\ x9D\x9E\x9F')", "\\7f \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x 8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F"); 63 shouldBeEqualToString("CSS.escape('\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\ x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\ x9D\x9E\x9F')", "\\7f \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x 8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F");
63 shouldBeEqualToString("CSS.escape('\xA0\xA1\xA2')", "\xA0\xA1\xA2"); 64 shouldBeEqualToString("CSS.escape('\xA0\xA1\xA2')", "\xA0\xA1\xA2");
64 shouldBeEqualToString("CSS.escape('a0123456789b')", "a0123456789b"); 65 shouldBeEqualToString("CSS.escape('a0123456789b')", "a0123456789b");
65 shouldBeEqualToString("CSS.escape('abcdefghijklmnopqrstuvwxyz')", "abcdefghi jklmnopqrstuvwxyz"); 66 shouldBeEqualToString("CSS.escape('abcdefghijklmnopqrstuvwxyz')", "abcdefghi jklmnopqrstuvwxyz");
66 shouldBeEqualToString("CSS.escape('ABCDEFGHIJKLMNOPQRSTUVWXYZ')", "ABCDEFGHI JKLMNOPQRSTUVWXYZ"); 67 shouldBeEqualToString("CSS.escape('ABCDEFGHIJKLMNOPQRSTUVWXYZ')", "ABCDEFGHI JKLMNOPQRSTUVWXYZ");
67 68
68 shouldBeEqualToString("CSS.escape('\x20\x21\x78\x79')", "\\ \\!xy"); 69 shouldBeEqualToString("CSS.escape('\x20\x21\x78\x79')", "\\ \\!xy");
69 70
70 // astral symbol (U+1D306 TETRAGRAM FOR CENTRE) 71 // astral symbol (U+1D306 TETRAGRAM FOR CENTRE)
71 shouldBeEqualToString("CSS.escape('\uD834\uDF06')", "\uD834\uDF06"); 72 shouldBeEqualToString("CSS.escape('\uD834\uDF06')", "\uD834\uDF06");
72 // lone surrogates 73 // lone surrogates
73 shouldBeEqualToString("CSS.escape('\uDF06')", '\uDF06'); 74 shouldBeEqualToString("CSS.escape('\uDF06')", '\uDF06');
74 shouldBeEqualToString("CSS.escape('\uD834')", '\uD834'); 75 shouldBeEqualToString("CSS.escape('\uD834')", '\uD834');
75 </script> 76 </script>
76 </body> 77 </body>
77 </html> 78 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/css3/escape-dom-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698