Chromium Code Reviews| Index: LayoutTests/fast/dom/Window/atob-btoa.html |
| diff --git a/LayoutTests/fast/dom/Window/atob-btoa.html b/LayoutTests/fast/dom/Window/atob-btoa.html |
| index fb4c0b783093e341c9dcfc66dae8ebff7f1bb917..ccef129d8e427439dc391a9a85e167a064e7bb3d 100644 |
| --- a/LayoutTests/fast/dom/Window/atob-btoa.html |
| +++ b/LayoutTests/fast/dom/Window/atob-btoa.html |
| @@ -11,6 +11,7 @@ shouldBe('window.atob("YWJj")', '"abc"'); |
| shouldBe('window.atob("YWJjZA==")', '"abcd"'); |
| shouldBe('window.atob("YWJjZGU=")', '"abcde"'); |
| shouldBe('window.atob("YWJjZGVm")', '"abcdef"'); |
| + |
| shouldBe('window.btoa("a")', '"YQ=="'); |
| shouldBe('window.btoa("ab")', '"YWI="'); |
| shouldBe('window.btoa("abc")', '"YWJj"'); |
| @@ -36,8 +37,19 @@ shouldThrow('window.atob()', '"TypeError: Failed to execute \'atob\' on \'Window |
| shouldBe('window.atob("")', '""'); |
| shouldBe('window.atob(null)', '"\x9Eée"'); // Gets converted to "null" string. |
| shouldThrow('window.atob(undefined)'); |
| -shouldThrow('window.atob(" YQ==")'); |
| -shouldThrow('window.atob("YQ==\\u000a")'); |
| + |
| +// HTML space characters in input. |
| +shouldBe('window.atob(" YQ==")', '"a"'); |
|
tkent
2013/11/05 21:39:07
nit: You can avoid nested quotes by shouldBeEqualT
Inactive
2013/11/05 21:55:57
I know, I was too lazy to fix all of the pre-exist
|
| +shouldBe('window.atob("YQ== ")', '"a"'); |
| +shouldBe('window.atob("YQ== ")', '"a"'); |
| +shouldBe('window.atob("YQ==\\u000a")', '"a"'); |
| +shouldBe('window.atob("YQ ==")', '"a"'); |
| +shouldBe('window.atob("YQ\\t==")', '"a"'); |
| +shouldBe('window.atob("YQ\\n==")', '"a"'); |
| +shouldBe('window.atob("YQ\\f==")', '"a"'); |
| +shouldBe('window.atob("YQ\\r==")', '"a"'); |
| +shouldBe('window.atob("YQ\\t\\n\\f\\r ==")', '"a"'); |
| + |
| shouldBe('window.atob("6ek=")', '"éé"'); |
| shouldBe('window.atob("6ek")', '"éé"'); |
| shouldBe('window.atob("gIE=")', '"\u0080\u0081"'); |