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

Issue 334303002: Using a mock LevelDBTransaction for corruption tests. (Closed)

Created:
6 years, 6 months ago by cmumford
Modified:
6 years, 6 months ago
Reviewers:
ericu, jsbell
CC:
chromium-reviews, jam, alecflett, ericu+idb_chromium.org, darin-cc_chromium.org, dgrogan, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Using a mock LevelDBTransaction for corruption tests. Was previously flushing the actual LevelDB table on disk and then corrupting. This approach is more loosely coupled with LevelDB disk format and lays the groundwork for future tests (and refactoring) to not rely on an actual corrupted db. Also reduced the number of test objects written to the db to 5. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278838

Patch Set 1 #

Total comments: 11

Patch Set 2 : Reduced scope of s_factory, "num" -> "instNum", etc. #

Total comments: 5

Patch Set 3 : '"' -> "\"" #

Patch Set 4 : Factored the new browser IDB content test objects into own file. #

Total comments: 8

Patch Set 5 : Combined VLOG and NOTREACHED #

Total comments: 13

Patch Set 6 : Renamed IndexedDBBrowserTestClassFactory, using url::ExtractQueryKeyValue, and misc. #

Patch Set 7 : LevelDBTraceTansaction::s_class_name is now static #

Unified diffs Side-by-side diffs Delta from patch set Stats (+325 lines, -9 lines) Patch
M content/browser/indexed_db/indexed_db_browsertest.cc View 1 2 3 4 5 7 chunks +93 lines, -2 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_transaction.h View 1 chunk +7 lines, -5 lines 0 comments Download
A content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download
A content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc View 1 2 3 4 5 6 1 chunk +168 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/test/data/indexeddb/corrupted_open_db_detection.html View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
cmumford
6 years, 6 months ago (2014-06-16 16:58:49 UTC) #1
ericu
I'm still reading this, but in terms of general philosophy I have mixed feelings. We ...
6 years, 6 months ago (2014-06-16 23:12:34 UTC) #2
cmumford
On 2014/06/16 23:12:34, ericu wrote: > I'm still reading this, but in terms of general ...
6 years, 6 months ago (2014-06-16 23:54:28 UTC) #3
ericu
https://codereview.chromium.org/334303002/diff/1/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/1/content/browser/indexed_db/indexed_db_browsertest.cc#newcode215 content/browser/indexed_db/indexed_db_browsertest.cc:215: test_class_factory_(new IndexedDBBrowserTestClassFactory) {} Is test_class_factory_ actually used somewhere? If ...
6 years, 6 months ago (2014-06-17 01:12:53 UTC) #4
cmumford
Also, I didn't mention that I have an upcoming CL to allow the failure of ...
6 years, 6 months ago (2014-06-17 16:29:24 UTC) #5
ericu
https://codereview.chromium.org/334303002/diff/1/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/1/content/browser/indexed_db/indexed_db_browsertest.cc#newcode679 content/browser/indexed_db/indexed_db_browsertest.cc:679: else if (it->first == "num") On 2014/06/17 16:29:24, cmumford ...
6 years, 6 months ago (2014-06-17 17:03:05 UTC) #6
cmumford
https://codereview.chromium.org/334303002/diff/20001/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/20001/content/browser/indexed_db/indexed_db_browsertest.cc#newcode215 content/browser/indexed_db/indexed_db_browsertest.cc:215: IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(GetIDBClassFactory); On 2014/06/17 17:03:05, ericu wrote: > Can you ...
6 years, 6 months ago (2014-06-17 21:53:18 UTC) #7
ericu
lgtm https://codereview.chromium.org/334303002/diff/20001/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/20001/content/browser/indexed_db/indexed_db_browsertest.cc#newcode215 content/browser/indexed_db/indexed_db_browsertest.cc:215: IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(GetIDBClassFactory); On 2014/06/17 21:53:18, cmumford wrote: > On ...
6 years, 6 months ago (2014-06-17 21:55:45 UTC) #8
cmumford
This patch set just moves the new test classes (IndexedDBBrowserTestClassFactory, LevelDBTestTansaction, etc.) into their own ...
6 years, 6 months ago (2014-06-18 16:39:39 UTC) #9
ericu
I like it.
6 years, 6 months ago (2014-06-18 16:55:20 UTC) #10
jsbell
Just a few drive-by nits. https://codereview.chromium.org/334303002/diff/60001/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/60001/content/browser/indexed_db/indexed_db_browsertest.cc#newcode530 content/browser/indexed_db/indexed_db_browsertest.cc:530: else { Nit: If ...
6 years, 6 months ago (2014-06-18 17:03:09 UTC) #11
cmumford
Forgot to indicate "Done" on Josh's comments. Addressed in patch #5. https://codereview.chromium.org/334303002/diff/60001/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): ...
6 years, 6 months ago (2014-06-18 18:06:44 UTC) #12
cmumford
On 2014/06/18 18:06:44, cmumford wrote: > Forgot to indicate "Done" on Josh's comments. Addressed in ...
6 years, 6 months ago (2014-06-19 20:27:33 UTC) #13
jsbell
Sorry, didn't know you were waiting for me. lgtm with various nits... (I think the ...
6 years, 6 months ago (2014-06-19 21:08:48 UTC) #14
cmumford
https://codereview.chromium.org/334303002/diff/80001/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/80001/content/browser/indexed_db/indexed_db_browsertest.cc#newcode545 content/browser/indexed_db/indexed_db_browsertest.cc:545: DCHECK(instance_num >= 1); On 2014/06/19 21:08:47, jsbell wrote: > ...
6 years, 6 months ago (2014-06-19 22:17:11 UTC) #15
jsbell
https://codereview.chromium.org/334303002/diff/80001/content/browser/indexed_db/indexed_db_browsertest_mock_factory.h File content/browser/indexed_db/indexed_db_browsertest_mock_factory.h (right): https://codereview.chromium.org/334303002/diff/80001/content/browser/indexed_db/indexed_db_browsertest_mock_factory.h#newcode28 content/browser/indexed_db/indexed_db_browsertest_mock_factory.h:28: class IndexedDBBrowserTestClassFactory : public IndexedDBClassFactory { On 2014/06/19 22:17:11, ...
6 years, 6 months ago (2014-06-19 22:36:04 UTC) #16
cmumford
https://codereview.chromium.org/334303002/diff/80001/content/browser/indexed_db/indexed_db_browsertest.cc File content/browser/indexed_db/indexed_db_browsertest.cc (right): https://codereview.chromium.org/334303002/diff/80001/content/browser/indexed_db/indexed_db_browsertest.cc#newcode518 content/browser/indexed_db/indexed_db_browsertest.cc:518: for (std::vector<std::pair<std::string, std::string> >::iterator it = On 2014/06/19 21:08:47, ...
6 years, 6 months ago (2014-06-19 22:45:58 UTC) #17
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-20 15:41:00 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/334303002/100001
6 years, 6 months ago (2014-06-20 15:42:36 UTC) #19
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-20 17:35:46 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/334303002/120001
6 years, 6 months ago (2014-06-20 17:42:17 UTC) #21
commit-bot: I haz the power
6 years, 6 months ago (2014-06-20 22:34:36 UTC) #22
Message was sent while issue was closed.
Change committed as 278838

Powered by Google App Engine
This is Rietveld 408576698