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

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

Issue 966843002: Mark DOMStringList.contains() as deprecated, add console warning. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Deprecate named getter Created 5 years, 9 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 IDBDatabase."); 6 description("Test the basics of IndexedDB's IDBDatabase.");
7 7
8 indexedDBTest(prepareDatabase, testSetVersionAbort); 8 indexedDBTest(prepareDatabase, testSetVersionAbort);
9 function prepareDatabase() 9 function prepareDatabase()
10 { 10 {
11 db = event.target.result; 11 db = event.target.result;
12 debug("Test that you can't open a transaction while in a versionchange trans action"); 12 debug("Test that you can't open a transaction while in a versionchange trans action");
13 evalAndExpectException('db.transaction("doesntExist")', 13 evalAndExpectException('db.transaction("doesntExist")',
14 "DOMException.INVALID_STATE_ERR", "'InvalidStateError '"); 14 "DOMException.INVALID_STATE_ERR", "'InvalidStateError '");
15 15
16 shouldBe("db.version", "1"); 16 shouldBe("db.version", "1");
17 shouldBeEqualToString("db.name", dbname); 17 shouldBeEqualToString("db.name", dbname);
18 shouldBe("db.objectStoreNames", "[]"); 18 shouldBe("db.objectStoreNames", "[]");
19 shouldBe("db.objectStoreNames.length", "0"); 19 shouldBe("db.objectStoreNames.length", "0");
20 shouldBe("db.objectStoreNames.contains('')", "false"); 20 shouldBe("db.objectStoreNames.contains('')", "false");
21 shouldBeUndefined("db.objectStoreNames[0]"); 21 shouldBeUndefined("db.objectStoreNames[0]");
22 shouldBeNull("db.objectStoreNames.item(0)");
23 22
24 objectStore = evalAndLog('db.createObjectStore("test123")'); 23 objectStore = evalAndLog('db.createObjectStore("test123")');
25 checkObjectStore(); 24 checkObjectStore();
26 } 25 }
27 26
28 function checkObjectStore() 27 function checkObjectStore()
29 { 28 {
30 shouldBe("db.objectStoreNames", "['test123']"); 29 shouldBe("db.objectStoreNames", "['test123']");
31 shouldBe("db.objectStoreNames.length", "1"); 30 shouldBe("db.objectStoreNames.length", "1");
32 shouldBe("db.objectStoreNames.contains('')", "false"); 31 shouldBe("db.objectStoreNames.contains('')", "false");
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 67
69 function testClose() 68 function testClose()
70 { 69 {
71 evalAndLog("db.close()"); 70 evalAndLog("db.close()");
72 debug("Now that the connection is closed, transaction creation should fail") ; 71 debug("Now that the connection is closed, transaction creation should fail") ;
73 evalAndExpectException("db.transaction('test123')", "DOMException.INVALID_ST ATE_ERR", "'InvalidStateError'"); 72 evalAndExpectException("db.transaction('test123')", "DOMException.INVALID_ST ATE_ERR", "'InvalidStateError'");
74 debug("Call twice, make sure it's harmless"); 73 debug("Call twice, make sure it's harmless");
75 evalAndLog("db.close()"); 74 evalAndLog("db.close()");
76 finishJSTest(); 75 finishJSTest();
77 } 76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698