Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / delete-range-expected.txt
blob97a2ab55d49e0e9979024c1f2f8047a73d350475
1 Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "delete-range.html"
7 indexedDB.deleteDatabase(dbname)
8 indexedDB.open(dbname)
9 db.createObjectStore('store')
11 trans = db.transaction('store', 'readwrite')
12 store = trans.objectStore('store')
13 store.put(1,1)
14 store.put(2,2)
15 store.put(3,3)
16 store.put(4,4)
17 store.put(5,5)
18 store.put(6,6)
19 store.put(7,7)
20 store.put(8,8)
21 store.put(9,9)
22 store.put(10,10)
23 store.delete(IDBKeyRange.bound(3, 8, false, false))
24 getting keys from store...
25 expect: [1,2,9,10]
26 actual: [1,2,9,10]
27 PASS Match!
29 trans = db.transaction('store', 'readwrite')
30 store = trans.objectStore('store')
31 store.put(1,1)
32 store.put(2,2)
33 store.put(3,3)
34 store.put(4,4)
35 store.put(5,5)
36 store.put(6,6)
37 store.put(7,7)
38 store.put(8,8)
39 store.put(9,9)
40 store.put(10,10)
41 store.delete(IDBKeyRange.bound(3, 8, true, false))
42 getting keys from store...
43 expect: [1,2,3,9,10]
44 actual: [1,2,3,9,10]
45 PASS Match!
47 trans = db.transaction('store', 'readwrite')
48 store = trans.objectStore('store')
49 store.put(1,1)
50 store.put(2,2)
51 store.put(3,3)
52 store.put(4,4)
53 store.put(5,5)
54 store.put(6,6)
55 store.put(7,7)
56 store.put(8,8)
57 store.put(9,9)
58 store.put(10,10)
59 store.delete(IDBKeyRange.bound(3, 8, false, true))
60 getting keys from store...
61 expect: [1,2,8,9,10]
62 actual: [1,2,8,9,10]
63 PASS Match!
65 trans = db.transaction('store', 'readwrite')
66 store = trans.objectStore('store')
67 store.put(1,1)
68 store.put(2,2)
69 store.put(3,3)
70 store.put(4,4)
71 store.put(5,5)
72 store.put(6,6)
73 store.put(7,7)
74 store.put(8,8)
75 store.put(9,9)
76 store.put(10,10)
77 store.delete(IDBKeyRange.bound(3, 8, true, true))
78 getting keys from store...
79 expect: [1,2,3,8,9,10]
80 actual: [1,2,3,8,9,10]
81 PASS Match!
82 PASS successfullyParsed is true
84 TEST COMPLETE