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

Side by Side Diff: chrome/test/data/indexeddb/key_path_test.js

Issue 6309015: Re-enable indexedDB browser tests after picking up WebKit revision 76531 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 function cursorSuccess() 6 function cursorSuccess()
7 { 7 {
8 debug("Cursor opened successfully.") 8 debug("Cursor opened successfully.")
9 // FIXME: check that we can iterate the cursor. 9 // FIXME: check that we can iterate the cursor.
10 shouldBe("event.result.direction", "0"); 10 shouldBe("event.result.direction", "0");
11 shouldBe("event.result.key", "'myKey' + count"); 11 shouldBe("event.result.key", "'myKey' + count");
12 shouldBe("event.result.value.keyPath", "'myKey' + count"); 12 shouldBe("event.result.value.keyPath", "'myKey' + count");
13 shouldBe("event.result.value.value", "'myValue' + count"); 13 shouldBe("event.result.value.value", "'myValue' + count");
14 if (++count >= 5) 14 if (++count >= 5)
15 done(); 15 done();
16 else 16 else
17 openCursor(); 17 openCursor();
18 } 18 }
19 19
20 function openCursor() 20 function openCursor()
21 { 21 {
22 debug("Opening cursor #" + count); 22 debug("Opening cursor #" + count);
23 keyRange = webkitIDBKeyRange.lowerBound("myKey" + count); 23 keyRange = webkitIDBKeyRange.lowerBound("myKey" + count);
24 result = objectStore.openCursor({range: keyRange}); 24 result = objectStore.openCursor(keyRange);
25 result.onsuccess = cursorSuccess; 25 result.onsuccess = cursorSuccess;
26 result.onerror = unexpectedErrorCallback; 26 result.onerror = unexpectedErrorCallback;
27 } 27 }
28 28
29 function populateObjectStore() 29 function populateObjectStore()
30 { 30 {
31 debug("Populating object store #" + count); 31 debug("Populating object store #" + count);
32 obj = {'keyPath': 'myKey' + count, 'value': 'myValue' + count}; 32 obj = {'keyPath': 'myKey' + count, 'value': 'myValue' + count};
33 result = objectStore.add(obj); 33 result = objectStore.add(obj);
34 result.onerror = unexpectedErrorCallback; 34 result.onerror = unexpectedErrorCallback;
(...skipping 26 matching lines...) Expand all
61 function test() 61 function test()
62 { 62 {
63 debug("Test IndexedDB's KeyPath."); 63 debug("Test IndexedDB's KeyPath.");
64 debug("Opening IndexedDB"); 64 debug("Opening IndexedDB");
65 result = webkitIndexedDB.open('name'); 65 result = webkitIndexedDB.open('name');
66 result.onsuccess = setVersion; 66 result.onsuccess = setVersion;
67 result.onerror = unexpectedErrorCallback; 67 result.onerror = unexpectedErrorCallback;
68 } 68 }
69 69
70 var successfullyParsed = true; 70 var successfullyParsed = true;
OLDNEW
« no previous file with comments | « chrome/test/data/indexeddb/index_test.js ('k') | chrome/test/data/indexeddb/transaction_run_forever.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698