Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / storage / indexeddb / objectstore-clear-expected.txt
1 Test IndexedDB's IDBObjectStore.clear().
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
7
8 dbname = "objectstore-clear.html"
9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname)
11 store = db.createObjectStore('storeName', null)
12 store.createIndex('indexName', '')
13 PASS store.indexNames.contains('indexName') is true
14 store.add('value', 'key')
15 otherStore = db.createObjectStore('otherStoreName', null)
16 otherStore.add('value', 'key')
17 store.clear()
18 PASS event.target.result is undefined.
19 store.openCursor()
20 PASS event.target.result is null
21 index = store.index('indexName')
22 index.openKeyCursor()
23 openKeyCursorSuccess():
24 PASS event.target.result is null
25 db.transaction(['otherStoreName'])
26 otherStore = transaction.objectStore('otherStoreName')
27 otherStore.get('key')
28 PASS event.target.result is "value"
29 PASS successfullyParsed is true
30
31 TEST COMPLETE
32