JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / storage / indexeddb / createObjectStore-name-argument-required.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 <script src="resources/shared.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11
12 description("Test IndexedDB createObjectStore name argument is required");
13 if (window.layoutTestController)
14     layoutTestController.waitUntilDone();
15
16 function test()
17 {
18     indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
19     shouldBeFalse("indexedDB == null");
20     IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
21     shouldBeFalse("IDBDatabaseException == null");
22     IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
23     shouldBeFalse("IDBCursor == null");
24     IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
25     shouldBeFalse("IDBKeyRange == null");
26
27     name = window.location.pathname;
28     description = "My Test Database";
29     request = evalAndLog("indexedDB.open(name, description)");
30     request.onsuccess = openSuccess;
31     request.onerror = unexpectedErrorCallback;
32 }
33
34 function openSuccess()
35 {
36     db = evalAndLog("db = event.target.result");
37
38     request = evalAndLog("request = db.setVersion('1')");
39     request.onsuccess = createAndPopulateObjectStore;
40     request.onerror = unexpectedErrorCallback;
41 }
42
43 function createAndPopulateObjectStore()
44 {
45     deleteAllObjectStores(db);
46
47     shouldThrow("db.createObjectStore();");
48     done();
49 }
50
51
52 test();
53
54 </script>
55 </body>
56 </html>