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

Side by Side Diff: LayoutTests/storage/indexeddb/resources/index-basics.js

Issue 152413005: IDL: allow optional values to be undefined in overload resolution (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 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 the basics of IndexedDB's webkitIDBIndex."); 6 description("Test the basics of IndexedDB's webkitIDBIndex.");
7 7
8 indexedDBTest(prepareDatabase); 8 indexedDBTest(prepareDatabase);
9 function prepareDatabase(evt) 9 function prepareDatabase(evt)
10 { 10 {
11 preamble(evt); 11 preamble(evt);
12 db = event.target.result; 12 db = event.target.result;
13 event.target.transaction.onabort = unexpectedAbortCallback; 13 event.target.transaction.onabort = unexpectedAbortCallback;
14 self.store = evalAndLog("db.createObjectStore('storeName', null)"); 14 self.store = evalAndLog("db.createObjectStore('storeName', null)");
15 self.indexObject = evalAndLog("store.createIndex('indexName', 'x')"); 15 self.indexObject = evalAndLog("store.createIndex('indexName', 'x')");
16 self.indexObject2 = evalAndLog("store.createIndex('indexName2', 'y', {unique : false})"); 16 self.indexObject2 = evalAndLog("store.createIndex('indexName2', 'y', {unique : false})");
17 self.indexObject3 = evalAndLog("store.createIndex('zIndex', 'z', {unique: tr ue})"); 17 self.indexObject3 = evalAndLog("store.createIndex('zIndex', 'z', {unique: tr ue})");
18 shouldNotThrow("store.createIndex('index4', 'path', undefined)");
18 shouldBeFalse("indexObject2.unique"); 19 shouldBeFalse("indexObject2.unique");
19 shouldBeTrue("indexObject3.unique"); 20 shouldBeTrue("indexObject3.unique");
20 evalAndExpectExceptionClass("store.createIndex('failureIndex', 'zzz', true)" , "TypeError"); 21 evalAndExpectExceptionClass("store.createIndex('failureIndex', 'zzz', true)" , "TypeError");
21 evalAndExpectExceptionClass("store.createIndex('failureIndex', 'zzz', 'strin g')", "TypeError"); 22 evalAndExpectExceptionClass("store.createIndex('failureIndex', 'zzz', 'strin g')", "TypeError");
22 addData(); 23 addData();
23 } 24 }
24 25
25 function addData() 26 function addData()
26 { 27 {
27 shouldBeTrue("'name' in indexObject"); 28 shouldBeTrue("'name' in indexObject");
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 shouldBe("event.target.result", "2"); 316 shouldBe("event.target.result", "2");
316 317
317 debug("Passing an invalid key into indexObject.get({})."); 318 debug("Passing an invalid key into indexObject.get({}).");
318 evalAndExpectException("indexObject.get({})", "0", "'DataError'"); 319 evalAndExpectException("indexObject.get({})", "0", "'DataError'");
319 320
320 debug("Passing an invalid key into indexObject.getKey({})."); 321 debug("Passing an invalid key into indexObject.getKey({}).");
321 evalAndExpectException("indexObject.getKey({})", "0", "'DataError'"); 322 evalAndExpectException("indexObject.getKey({})", "0", "'DataError'");
322 323
323 finishJSTest(); 324 finishJSTest();
324 } 325 }
OLDNEW
« no previous file with comments | « LayoutTests/storage/indexeddb/index-basics-workers-expected.txt ('k') | Source/bindings/scripts/code_generator_v8.pm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698