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

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

Issue 19576002: Make atob() / btoa() argument non optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/atob-btoa-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50e81d4f94e113978c44670d17ab244cd12db5aa..a3333bcf5aa51824780b20c1517c68a6de00758c 100644
--- a/LayoutTests/fast/dom/Window/atob-btoa.html
+++ b/LayoutTests/fast/dom/Window/atob-btoa.html
@@ -19,9 +19,9 @@ shouldBe('window.btoa("abcde")', '"YWJjZGU="');
shouldBe('window.btoa("abcdef")', '"YWJjZGVm"');
shouldBe('typeof window.btoa', '"function"');
-shouldBe('window.btoa()', '"dW5kZWZpbmVk"');
+shouldThrow('window.btoa()', '"TypeError: Not enough arguments"');
shouldBe('window.btoa("")', '""');
-shouldBe('window.btoa(null)', '""');
+shouldBe('window.btoa(null)', '"bnVsbA=="'); // Gets converted to "null" string.
shouldBe('window.btoa(undefined)', '"dW5kZWZpbmVk"');
shouldBe('window.btoa(window)', '"W29iamVjdCBXaW5kb3dd"'); // "[object Window]"
shouldBe('window.btoa("éé")', '"6ek="');
@@ -32,9 +32,9 @@ shouldBe('window.btoa', '0');
shouldBe('typeof window.btoa', '"number"');
shouldBe('typeof window.atob', '"function"');
-shouldThrow('window.atob()'); // 'undefined'
+shouldThrow('window.atob()', '"TypeError: Not enough arguments"');
shouldBe('window.atob("")', '""');
-shouldBe('window.atob(null)', '""');
+shouldBe('window.atob(null)', '"\x9Eée"'); // Gets converted to "null" string.
shouldThrow('window.atob(undefined)');
shouldThrow('window.atob(" YQ==")');
shouldThrow('window.atob("YQ==\\u000a")');
« 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