OLD | NEW |
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="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 shouldBe('window.atob("YQ==")', '"a"'); | 8 shouldBe('window.atob("YQ==")', '"a"'); |
9 shouldBe('window.atob("YWI=")', '"ab"'); | 9 shouldBe('window.atob("YWI=")', '"ab"'); |
10 shouldBe('window.atob("YWJj")', '"abc"'); | 10 shouldBe('window.atob("YWJj")', '"abc"'); |
(...skipping 28 matching lines...) Expand all Loading... |
39 shouldThrow('window.atob(" YQ==")'); | 39 shouldThrow('window.atob(" YQ==")'); |
40 shouldThrow('window.atob("YQ==\\u000a")'); | 40 shouldThrow('window.atob("YQ==\\u000a")'); |
41 shouldBe('window.atob("6ek=")', '"éé"'); | 41 shouldBe('window.atob("6ek=")', '"éé"'); |
42 shouldBe('window.atob("6ek")', '"éé"'); | 42 shouldBe('window.atob("6ek")', '"éé"'); |
43 shouldBe('window.atob("gIE=")', '"\u0080\u0081"'); | 43 shouldBe('window.atob("gIE=")', '"\u0080\u0081"'); |
44 shouldThrow('window.atob("тест")'); | 44 shouldThrow('window.atob("тест")'); |
45 shouldThrow('window.atob("z")'); | 45 shouldThrow('window.atob("z")'); |
46 shouldBe('window.atob("zz")', '"Ï"'); | 46 shouldBe('window.atob("zz")', '"Ï"'); |
47 shouldBe('window.atob("zzz")', '"Ï\u003C"'); | 47 shouldBe('window.atob("zzz")', '"Ï\u003C"'); |
48 shouldBe('window.atob("zzz=")', '"Ï\u003C"'); | 48 shouldBe('window.atob("zzz=")', '"Ï\u003C"'); |
49 shouldBe('window.atob("zzz==")', '"Ï\u003C"'); | 49 shouldThrow('window.atob("zzz==")'); // excess pad characters. |
50 shouldBe('window.atob("zzz===")', '"Ï\u003C"'); | 50 shouldThrow('window.atob("zzz===")'); // excess pad characters. |
51 shouldBe('window.atob("zzz====")', '"Ï\u003C"'); | 51 shouldThrow('window.atob("zzz====")'); // excess pad characters. |
52 shouldBe('window.atob("zzzz")', '"Ï\u003Có"'); | 52 shouldBe('window.atob("zzzz")', '"Ï\u003Có"'); |
53 shouldThrow('window.atob("zzzzz")'); | 53 shouldThrow('window.atob("zzzzz")'); |
54 shouldThrow('window.atob("z=zz")'); | 54 shouldThrow('window.atob("z=zz")'); |
55 shouldThrow('window.atob("=")'); | 55 shouldThrow('window.atob("=")'); |
56 shouldThrow('window.atob("==")'); | 56 shouldThrow('window.atob("==")'); |
57 shouldThrow('window.atob("===")'); | 57 shouldThrow('window.atob("===")'); |
58 shouldThrow('window.atob("====")'); | 58 shouldThrow('window.atob("====")'); |
59 shouldThrow('window.atob("=====")'); | 59 shouldThrow('window.atob("=====")'); |
60 window.atob = 0; | 60 window.atob = 0; |
61 shouldBe('window.atob', '0'); | 61 shouldBe('window.atob', '0'); |
62 shouldBe('typeof window.atob', '"number"'); | 62 shouldBe('typeof window.atob', '"number"'); |
63 | 63 |
64 </script> | 64 </script> |
65 <script src="../../js/resources/js-test-post.js"></script> | 65 <script src="../../js/resources/js-test-post.js"></script> |
66 </body> | 66 </body> |
67 </html> | 67 </html> |
OLD | NEW |