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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js

Issue 1476863003: bindings: Ignores the last undefined arguments when counting the args. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 5 years 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
OLDNEW
1 if (this.importScripts) { 1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js'); 2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js'); 3 importScripts('shared.js');
4 } 4 }
5 5
6 description("Test that bad version parameters cause TypeError"); 6 description("Test that bad version parameters cause TypeError");
7 7
8 function test() 8 function test()
9 { 9 {
10 setDBNameFromPath(); 10 setDBNameFromPath();
11 11
12 request = evalAndLog("indexedDB.deleteDatabase(dbname)"); 12 request = evalAndLog("indexedDB.deleteDatabase(dbname)");
13 request.onsuccess = deleteSuccess; 13 request.onsuccess = deleteSuccess;
14 request.onerror = unexpectedErrorCallback; 14 request.onerror = unexpectedErrorCallback;
15 } 15 }
16 16
17 function deleteSuccess(evt) { 17 function deleteSuccess(evt) {
18 preamble(); 18 preamble();
19 evalAndExpectExceptionClass("indexedDB.open(dbname, 'stringversion')", "Type Error"); 19 evalAndExpectExceptionClass("indexedDB.open(dbname, 'stringversion')", "Type Error");
20 evalAndExpectExceptionClass("indexedDB.open(dbname, 0)", "TypeError"); 20 evalAndExpectExceptionClass("indexedDB.open(dbname, 0)", "TypeError");
21 evalAndExpectExceptionClass("indexedDB.open(dbname, -5)", "TypeError"); 21 evalAndExpectExceptionClass("indexedDB.open(dbname, -5)", "TypeError");
22 evalAndExpectExceptionClass("indexedDB.open(dbname, Infinity)", "TypeError") ; 22 evalAndExpectExceptionClass("indexedDB.open(dbname, Infinity)", "TypeError") ;
23 evalAndExpectExceptionClass("indexedDB.open(dbname, -Infinity)", "TypeError" ); 23 evalAndExpectExceptionClass("indexedDB.open(dbname, -Infinity)", "TypeError" );
24 evalAndExpectExceptionClass("indexedDB.open(dbname, NaN)", "TypeError"); 24 evalAndExpectExceptionClass("indexedDB.open(dbname, NaN)", "TypeError");
25 evalAndExpectExceptionClass("indexedDB.open(dbname, -1)", "TypeError"); 25 evalAndExpectExceptionClass("indexedDB.open(dbname, -1)", "TypeError");
26 evalAndExpectExceptionClass("indexedDB.open(dbname, 0x20000000000000)", "Typ eError"); 26 evalAndExpectExceptionClass("indexedDB.open(dbname, 0x20000000000000)", "Typ eError");
27 evalAndExpectExceptionClass("indexedDB.open(dbname, null)", "TypeError"); 27 evalAndExpectExceptionClass("indexedDB.open(dbname, null)", "TypeError");
28 evalAndExpectExceptionClass("indexedDB.open(dbname, undefined)", "TypeError" ); 28 evalAndLog("indexedDB.open(dbname, undefined)");
jsbell 2015/12/01 00:31:02 Can you change this to shouldNotThrow() and add a
Yuki 2015/12/01 05:57:43 Done.
29 finishJSTest(); 29 finishJSTest();
30 } 30 }
31 31
32 test(); 32 test();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698