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

Side by Side Diff: content/test/data/indexeddb/object_store_test.js

Issue 11415083: Remove references to IDBDatabaseException and IDBRequest.errorCode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix error propagation from workers in endure test Created 8 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 var testDate = new Date("February 24, 1955 12:00:00"); 5 var testDate = new Date("February 24, 1955 12:00:00");
6 6
7 function getByDateSuccess() 7 function getByDateSuccess()
8 { 8 {
9 debug('Data retrieved by date key'); 9 debug('Data retrieved by date key');
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 debug('More data added'); 59 debug('More data added');
60 60
61 var request = objectStore.get(1); 61 var request = objectStore.get(1);
62 request.onsuccess = getSuccess; 62 request.onsuccess = getSuccess;
63 request.onerror = unexpectedErrorCallback; 63 request.onerror = unexpectedErrorCallback;
64 } 64 }
65 65
66 function addWithSameKeyFailed() 66 function addWithSameKeyFailed()
67 { 67 {
68 debug('Adding a record with same key failed'); 68 debug('Adding a record with same key failed');
69 shouldBe("event.target.errorCode",
70 "webkitIDBDatabaseException.CONSTRAINT_ERR");
71 shouldBe("event.target.error.name", "'ConstraintError'"); 69 shouldBe("event.target.error.name", "'ConstraintError'");
72 event.preventDefault(); 70 event.preventDefault();
73 71
74 var request = transaction.objectStore('stuff').add('foo', testDate); 72 var request = transaction.objectStore('stuff').add('foo', testDate);
75 request.onsuccess = moreDataAddedSuccess; 73 request.onsuccess = moreDataAddedSuccess;
76 request.onerror = unexpectedErrorCallback; 74 request.onerror = unexpectedErrorCallback;
77 } 75 }
78 76
79 function dataAddedSuccess() 77 function dataAddedSuccess()
80 { 78 {
(...skipping 24 matching lines...) Expand all
105 shouldBe("objectStore.indexNames[1]", "'lname_index'"); 103 shouldBe("objectStore.indexNames[1]", "'lname_index'");
106 104
107 var request = objectStore.add({fname: "John", lname: "Doe", id: 1}); 105 var request = objectStore.add({fname: "John", lname: "Doe", id: 1});
108 request.onsuccess = dataAddedSuccess; 106 request.onsuccess = dataAddedSuccess;
109 request.onerror = unexpectedErrorCallback; 107 request.onerror = unexpectedErrorCallback;
110 } 108 }
111 109
112 function test() { 110 function test() {
113 indexedDBTest(populateObjectStore); 111 indexedDBTest(populateObjectStore);
114 } 112 }
OLDNEW
« no previous file with comments | « content/test/data/indexeddb/key_types_test.js ('k') | content/test/data/indexeddb/value_size_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698