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

Unified Diff: LayoutTests/storage/domstorage/localstorage/missing-arguments.html

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/storage/domstorage/localstorage/missing-arguments.html
diff --git a/LayoutTests/storage/domstorage/localstorage/missing-arguments.html b/LayoutTests/storage/domstorage/localstorage/missing-arguments.html
index 58e1460bf451a5eb1a5ac52b164801848a09ef4d..8306346b40807e155e82c301abdc58c891124bd2 100644
--- a/LayoutTests/storage/domstorage/localstorage/missing-arguments.html
+++ b/LayoutTests/storage/domstorage/localstorage/missing-arguments.html
@@ -4,13 +4,11 @@
description('Ensures that we get exceptions when we do not include required arguments for localStorage methods.');
-var notEnoughArguments = '"TypeError: Not enough arguments"';
-
-shouldThrow('localStorage.key()', notEnoughArguments);
-shouldThrow('localStorage.getItem()', notEnoughArguments);
-shouldThrow('localStorage.setItem()', notEnoughArguments);
-shouldThrow('localStorage.setItem("a")', notEnoughArguments);
-shouldThrow('localStorage.removeItem()', notEnoughArguments);
+shouldThrow('localStorage.key()', '"TypeError: Failed to execute \'key\' on \'Storage\': 1 argument required, but only 0 present."');
+shouldThrow('localStorage.getItem()', '"TypeError: Failed to execute \'getItem\' on \'Storage\': 1 argument required, but only 0 present."');
+shouldThrow('localStorage.setItem()', '"TypeError: Failed to execute \'setItem\' on \'Storage\': 2 arguments required, but only 0 present."');
+shouldThrow('localStorage.setItem("a")', '"TypeError: Failed to execute \'setItem\' on \'Storage\': 2 arguments required, but only 0 present."');
+shouldThrow('localStorage.removeItem()', '"TypeError: Failed to execute \'removeItem\' on \'Storage\': 1 argument required, but only 0 present."');
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>

Powered by Google App Engine
This is Rietveld 408576698