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

Side by Side Diff: LayoutTests/fast/dom/Window/atob-btoa.html

Issue 215833002: window.atob() returns wrong value when given a string container only white spaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/atob-btoa-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 PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
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 shouldBeEqualToString('window.atob("YQ==")', 'a'); 8 shouldBeEqualToString('window.atob("YQ==")', 'a');
9 shouldBeEqualToString('window.atob("YWI=")', 'ab'); 9 shouldBeEqualToString('window.atob("YWI=")', 'ab');
10 shouldBeEqualToString('window.atob("YWJj")', 'abc'); 10 shouldBeEqualToString('window.atob("YWJj")', 'abc');
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 shouldThrow('window.atob("тест")'); 56 shouldThrow('window.atob("тест")');
57 shouldThrow('window.atob("z")'); 57 shouldThrow('window.atob("z")');
58 shouldBeEqualToString('window.atob("zz")', 'Ï'); 58 shouldBeEqualToString('window.atob("zz")', 'Ï');
59 shouldBeEqualToString('window.atob("zzz")', 'Ï\u003C'); 59 shouldBeEqualToString('window.atob("zzz")', 'Ï\u003C');
60 shouldBeEqualToString('window.atob("zzz=")', 'Ï\u003C'); 60 shouldBeEqualToString('window.atob("zzz=")', 'Ï\u003C');
61 shouldThrow('window.atob("zzz==")'); // excess pad characters. 61 shouldThrow('window.atob("zzz==")'); // excess pad characters.
62 shouldThrow('window.atob("zzz===")'); // excess pad characters. 62 shouldThrow('window.atob("zzz===")'); // excess pad characters.
63 shouldThrow('window.atob("zzz====")'); // excess pad characters. 63 shouldThrow('window.atob("zzz====")'); // excess pad characters.
64 shouldThrow('window.atob("zzz=====")'); // excess pad characters. 64 shouldThrow('window.atob("zzz=====")'); // excess pad characters.
65 shouldBeEqualToString('window.atob("zzzz")', 'Ï\u003Có'); 65 shouldBeEqualToString('window.atob("zzzz")', 'Ï\u003Có');
66 shouldBeEqualToString('atob(" ")', ''); // whitespace only.
66 shouldThrow('window.atob("zzzzz")'); 67 shouldThrow('window.atob("zzzzz")');
67 shouldThrow('window.atob("z=zz")'); 68 shouldThrow('window.atob("z=zz")');
68 shouldThrow('window.atob("=")'); 69 shouldThrow('window.atob("=")');
69 shouldThrow('window.atob("==")'); 70 shouldThrow('window.atob("==")');
70 shouldThrow('window.atob("===")'); 71 shouldThrow('window.atob("===")');
71 shouldThrow('window.atob("====")'); 72 shouldThrow('window.atob("====")');
72 shouldThrow('window.atob("=====")'); 73 shouldThrow('window.atob("=====")');
73 window.atob = 0; 74 window.atob = 0;
74 shouldBe('window.atob', '0'); 75 shouldBe('window.atob', '0');
75 shouldBeEqualToString('typeof window.atob', 'number'); 76 shouldBeEqualToString('typeof window.atob', 'number');
76 77
77 </script> 78 </script>
78 </body> 79 </body>
79 </html> 80 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/atob-btoa-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698