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

Issue 10803029: Add read/write tests, index creation/deletion test. (Closed)

Created:
8 years, 5 months ago by ericu
Modified:
8 years, 4 months ago
Reviewers:
jsbell
CC:
chromium-reviews, alecflett, dgrogan
Visibility:
Public.

Description

Add read/write tests, index creation/deletion test. This is based on https://chromiumcodereview.appspot.com/10790041/, not yet submitted. BUG=137764 TEST=self Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=148635

Patch Set 1 #

Patch Set 2 : Remove extra object wrapper [debug code]. #

Total comments: 2

Patch Set 3 : Fix onfailure->onerror #

Patch Set 4 : Merged out, fixed indexed writes. #

Total comments: 19

Patch Set 5 : merged out CR changes from upstream #

Patch Set 6 : Rolled in code review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -68 lines) Patch
M chrome/test/data/indexeddb/perf_shared.js View 1 2 3 4 5 3 chunks +108 lines, -9 lines 0 comments Download
M chrome/test/data/indexeddb/perf_test.js View 1 2 3 4 5 4 chunks +78 lines, -59 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ericu
8 years, 5 months ago (2012-07-19 00:02:59 UTC) #1
jsbell
Eyes glazing over, will take a deeper look tomorrow, but I noticed this. https://chromiumcodereview.appspot.com/10803029/diff/2001/chrome/test/data/indexeddb/perf_shared.js File ...
8 years, 5 months ago (2012-07-19 00:28:57 UTC) #2
ericu
https://chromiumcodereview.appspot.com/10803029/diff/2001/chrome/test/data/indexeddb/perf_shared.js File chrome/test/data/indexeddb/perf_shared.js (right): https://chromiumcodereview.appspot.com/10803029/diff/2001/chrome/test/data/indexeddb/perf_shared.js#newcode91 chrome/test/data/indexeddb/perf_shared.js:91: setVersionRequest.onfailure = errorHandler; On 2012/07/19 00:28:57, jsbell wrote: > ...
8 years, 4 months ago (2012-07-24 21:58:07 UTC) #3
jsbell
Overall lgtm, some issues noted. http://codereview.chromium.org/10803029/diff/9001/chrome/test/data/indexeddb/perf_shared.js File chrome/test/data/indexeddb/perf_shared.js (right): http://codereview.chromium.org/10803029/diff/9001/chrome/test/data/indexeddb/perf_shared.js#newcode81 chrome/test/data/indexeddb/perf_shared.js:81: var db = openRequest.result; ...
8 years, 4 months ago (2012-07-26 18:52:41 UTC) #4
ericu
8 years, 4 months ago (2012-07-26 21:03:12 UTC) #5
https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
File chrome/test/data/indexeddb/perf_shared.js (right):

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_shared.js:117: // TODO: This won't work in
Firefox yet; see above in createDatabase.
On 2012/07/26 18:52:41, jsbell wrote:
> I wrote an upgradeneeded shim for the current version of Chrome you could use
> until we land the real version (coming real soon!)
> 
> https://bugs.webkit.org/attachment.cgi?id=154148&action=review
> 
> Search for "feature-detect"

I'll consider adding that in a later CL, especially if this hack doesn't work
when I start testing in Firefox.  Thanks for the pointer.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_shared.js:182: Array.prototype.slice.call(args,
0, args.length - 1).join("_");
On 2012/07/26 18:52:41, jsbell wrote:
> Cute. :) Maybe a comment that last argument is assumed to be a callback
function
> and so not included.
> 
> (Alternately, could do a map() that does a typeof check and uses the name for
> function args.)

Done.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_shared.js:200: var os =
transaction.objectStore(objectStoreNames[i]);
On 2012/07/26 18:52:41, jsbell wrote:
> This will throw if not found, never return null. So the assertion is fine, but
> it validates the IDB implementation more than the test logic.

Removed.  It'll fail quickly enough anyway.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_shared.js:216: var queryObject = os;
On 2012/07/26 18:52:41, jsbell wrote:
> FYI, in the IDB spec itself this (a store or index) would be called the
"source"
> of a request.

Sounds good; changed to "source".

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
File chrome/test/data/indexeddb/perf_test.js (right):

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_test.js:48: function () { return "test value";
});
On 2012/07/26 18:52:41, jsbell wrote:
> Isn't this being specified for the getKey argument?

Yup; fixed.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_test.js:115: }
On 2012/07/26 18:52:41, jsbell wrote:
> Missing semicolon.

Done.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_test.js:130: }
On 2012/07/26 18:52:41, jsbell wrote:
> Missing semicolon.

Done.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_test.js:135: function onIndexDeleted(db) {
On 2012/07/26 18:52:41, jsbell wrote:
> Not used?

Removed.

https://chromiumcodereview.appspot.com/10803029/diff/9001/chrome/test/data/in...
chrome/test/data/indexeddb/perf_test.js:136: cleanUpFunc(db);
On 2012/07/26 18:52:41, jsbell wrote:
> The function returned by getCleanUpFunc() doesn't take args.

Done.

Powered by Google App Engine
This is Rietveld 408576698