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

Side by Side Diff: LayoutTests/storage/indexeddb/keypath-arrays-expected.txt

Issue 1184503003: IndexedDB: Array-type keypaths should not be returned as DOMStringLists (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/resources/keypath-arrays.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Test IndexedDB Array-type keyPaths 1 Test IndexedDB Array-type keyPaths
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self. msIndexedDB || self.OIndexedDB; 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self. msIndexedDB || self.OIndexedDB;
7 7
8 dbname = "keypath-arrays.html" 8 dbname = "keypath-arrays.html"
9 indexedDB.deleteDatabase(dbname) 9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname) 10 indexedDB.open(dbname)
11 store = db.createObjectStore('store', {keyPath: ['a', 'b']}) 11 store = db.createObjectStore('store', {keyPath: ['a', 'b']})
12 store.createIndex('index', ['c', 'd']) 12 index = store.createIndex('index', ['c', 'd'])
13 PASS areArraysEqual(index.keyPath, ['c', 'd']) is true
14 PASS index.keyPath instanceof DOMStringList is false
13 Expecting exception from db.createObjectStore('store-with-generator', {keyPath: ['a', 'b'], autoIncrement: true}) 15 Expecting exception from db.createObjectStore('store-with-generator', {keyPath: ['a', 'b'], autoIncrement: true})
14 PASS Exception was thrown. 16 PASS Exception was thrown.
15 PASS code is DOMException.INVALID_ACCESS_ERR 17 PASS code is DOMException.INVALID_ACCESS_ERR
16 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The a utoIncrement option was set but the keyPath option was empty or an array. 18 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The a utoIncrement option was set but the keyPath option was empty or an array.
17 Expecting exception from store.createIndex('index-multientry', ['e', 'f'], {mult iEntry: true}) 19 Expecting exception from store.createIndex('index-multientry', ['e', 'f'], {mult iEntry: true})
18 PASS Exception was thrown. 20 PASS Exception was thrown.
19 PASS code is DOMException.INVALID_ACCESS_ERR 21 PASS code is DOMException.INVALID_ACCESS_ERR
20 Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyP ath argument was an array and the multiEntry option is true. 22 Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyP ath argument was an array and the multiEntry option is true.
21 23
22 Empty arrays are not valid key paths: 24 Empty arrays are not valid key paths:
(...skipping 18 matching lines...) Expand all
41 PASS JSON.stringify(cursor.key) is "[1,2]" 43 PASS JSON.stringify(cursor.key) is "[1,2]"
42 request = index.openCursor() 44 request = index.openCursor()
43 cursor = request.result 45 cursor = request.result
44 PASS cursor is non-null. 46 PASS cursor is non-null.
45 PASS JSON.stringify(cursor.primaryKey) is "[1,2]" 47 PASS JSON.stringify(cursor.primaryKey) is "[1,2]"
46 PASS JSON.stringify(cursor.key) is "[3,4]" 48 PASS JSON.stringify(cursor.key) is "[3,4]"
47 PASS successfullyParsed is true 49 PASS successfullyParsed is true
48 50
49 TEST COMPLETE 51 TEST COMPLETE
50 52
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/resources/keypath-arrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698