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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../fast/js/resources/js-test-pre.js"></script> 2 <script src="../../../fast/js/resources/js-test-pre.js"></script>
3 <script> 3 <script>
4 4
5 description('Ensures that we get exceptions when we do not include required argu ments for localStorage methods.'); 5 description('Ensures that we get exceptions when we do not include required argu ments for localStorage methods.');
6 6
7 var notEnoughArguments = '"TypeError: Not enough arguments"'; 7 shouldThrow('localStorage.key()', '"TypeError: Failed to execute \'key\' on \'St orage\': 1 argument required, but only 0 present."');
8 8 shouldThrow('localStorage.getItem()', '"TypeError: Failed to execute \'getItem\' on \'Storage\': 1 argument required, but only 0 present."');
9 shouldThrow('localStorage.key()', notEnoughArguments); 9 shouldThrow('localStorage.setItem()', '"TypeError: Failed to execute \'setItem\' on \'Storage\': 2 arguments required, but only 0 present."');
10 shouldThrow('localStorage.getItem()', notEnoughArguments); 10 shouldThrow('localStorage.setItem("a")', '"TypeError: Failed to execute \'setIte m\' on \'Storage\': 2 arguments required, but only 0 present."');
11 shouldThrow('localStorage.setItem()', notEnoughArguments); 11 shouldThrow('localStorage.removeItem()', '"TypeError: Failed to execute \'remove Item\' on \'Storage\': 1 argument required, but only 0 present."');
12 shouldThrow('localStorage.setItem("a")', notEnoughArguments);
13 shouldThrow('localStorage.removeItem()', notEnoughArguments);
14 12
15 </script> 13 </script>
16 <script src="../../../fast/js/resources/js-test-post.js"></script> 14 <script src="../../../fast/js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698