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

Issue 356463008: Cleanup IndexedDBIO unit tests using GoogleMock. (Closed)

Created:
6 years, 6 months ago by cmumford
Modified:
6 years, 5 months ago
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

Cleanup IndexedDBIO unit tests using GoogleMock. Previous tests had the following limitations: 1. Not all ASSERT/EXPECT's were within the test functions. 2. Not verifying that OpenLevelDB was ever called. 3. Unused MockErrorLevelDBFactory::expect_destroy. 4. Explicitly doing things (like functionXXX called) which we get for free by using GoogleMock. BUG=388012 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283995

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebased on master for trybot #

Patch Set 3 : exporting LevelDBFactories for shared library support #

Patch Set 4 : Added gmock dependency to GN file #

Patch Set 5 : Allowing path to gmock (testing for AOSP) #

Patch Set 6 : Added gmock dependency for AOSP #

Patch Set 7 : Moved mock_leveldb_factory.cc into content_tests #

Patch Set 8 : Removed gmock dependency for AOSP #

Patch Set 9 : not exporting MockLevelDBFactory #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -74 lines) Patch
M content/browser/indexed_db/indexed_db_backing_store.h View 1 chunk +1 line, -10 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc View 10 chunks +51 lines, -60 lines 0 comments Download
A content/browser/indexed_db/leveldb/leveldb_factory.h View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
A content/browser/indexed_db/leveldb/mock_leveldb_factory.h View 3 4 5 6 7 8 1 chunk +29 lines, -0 lines 0 comments Download
A + content/browser/indexed_db/leveldb/mock_leveldb_factory.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 64 (0 generated)
cmumford
Note: the tests *did* work before. This is just some refactoring to clean up the ...
6 years, 6 months ago (2014-06-24 21:35:06 UTC) #1
ericu
https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc File content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc (right): https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc#newcode82 content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc:82: leveldb::Status open_error_; Initialize open_error_. https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc#newcode101 content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc:101: EXPECT_CALL(mock_leveldb_factory, DestroyLevelDB(_)).Times(Exactly(1)); What ...
6 years, 6 months ago (2014-06-24 23:57:47 UTC) #2
cmumford
https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc File content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc (right): https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc#newcode82 content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc:82: leveldb::Status open_error_; On 2014/06/24 23:57:47, ericu wrote: > Initialize ...
6 years, 6 months ago (2014-06-25 00:05:28 UTC) #3
ericu
https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc File content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc (right): https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc#newcode82 content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc:82: leveldb::Status open_error_; On 2014/06/25 00:05:28, cmumford wrote: > On ...
6 years, 6 months ago (2014-06-25 00:09:43 UTC) #4
cmumford
On 2014/06/25 00:09:43, ericu wrote: > https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc > File content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc > (right): > > https://codereview.chromium.org/356463008/diff/1/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc#newcode82 ...
6 years, 6 months ago (2014-06-25 00:47:06 UTC) #5
ericu
lgtm
6 years, 6 months ago (2014-06-25 17:28:36 UTC) #6
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-25 18:36:58 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/1
6 years, 6 months ago (2014-06-25 18:38:31 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-25 21:14:26 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-25 21:21:29 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/155884)
6 years, 6 months ago (2014-06-25 21:21:29 UTC) #11
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-25 22:14:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/1
6 years, 6 months ago (2014-06-25 22:15:51 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-25 23:24:40 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-25 23:30:07 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_gn_rel/builds/20491)
6 years, 6 months ago (2014-06-25 23:30:08 UTC) #16
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-26 00:15:49 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/1
6 years, 6 months ago (2014-06-26 00:17:14 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-26 00:51:08 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-26 00:54:11 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/87685) android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/155982) linux_chromium_chromeos_clang_dbg ...
6 years, 6 months ago (2014-06-26 00:54:12 UTC) #21
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-26 03:19:34 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/1
6 years, 6 months ago (2014-06-26 03:20:16 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-26 04:40:03 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-26 04:43:38 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/87753) android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/156045) linux_chromium_chromeos_clang_dbg ...
6 years, 6 months ago (2014-06-26 04:43:39 UTC) #26
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-26 14:09:18 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/1
6 years, 6 months ago (2014-06-26 14:10:50 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-26 14:18:13 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-26 14:20:34 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_compile_dbg/builds/36392)
6 years, 6 months ago (2014-06-26 14:20:35 UTC) #31
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-26 17:42:05 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/20001
6 years, 6 months ago (2014-06-26 17:43:06 UTC) #33
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 6 months ago (2014-06-26 19:33:08 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/40001
6 years, 6 months ago (2014-06-26 19:33:52 UTC) #35
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-26 23:28:59 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-26 23:34:50 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_gn_rel/builds/20946)
6 years, 6 months ago (2014-06-26 23:34:50 UTC) #38
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 5 months ago (2014-06-27 13:55:14 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/40001
6 years, 5 months ago (2014-06-27 13:56:25 UTC) #40
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 5 months ago (2014-06-27 14:08:12 UTC) #41
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-06-27 14:17:58 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/88226)
6 years, 5 months ago (2014-06-27 14:17:58 UTC) #43
cmumford
On 2014/06/27 14:17:58, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 5 months ago (2014-06-30 15:28:57 UTC) #44
cmumford
+benm for android_webview/buildbot/deps_whitelist.py +avi for content/browser/BUILD.gn
6 years, 5 months ago (2014-07-07 16:33:59 UTC) #45
Avi (use Gerrit)
lgtm stamp assuming that deps is correct
6 years, 5 months ago (2014-07-07 16:36:55 UTC) #46
cmumford
-benm, +torne since Ben is OOO till 7/15
6 years, 5 months ago (2014-07-11 16:43:23 UTC) #47
Torne
Do we really need to add gmock as a dependency of content_browser? That seems wrong; ...
6 years, 5 months ago (2014-07-14 15:58:09 UTC) #48
cmumford
On 2014/07/14 15:58:09, Torne wrote: > Do we really need to add gmock as a ...
6 years, 5 months ago (2014-07-14 18:46:58 UTC) #49
Torne
On 2014/07/14 18:46:58, cmumford wrote: > On 2014/07/14 15:58:09, Torne wrote: > > Do we ...
6 years, 5 months ago (2014-07-14 20:41:06 UTC) #50
cmumford
On 2014/07/14 20:41:06, Torne wrote: > On 2014/07/14 18:46:58, cmumford wrote: > > On 2014/07/14 ...
6 years, 5 months ago (2014-07-14 22:23:27 UTC) #51
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 5 months ago (2014-07-14 22:23:35 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/140001
6 years, 5 months ago (2014-07-14 22:25:53 UTC) #53
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-14 23:45:30 UTC) #54
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-15 15:51:13 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_compile_dbg/builds/37911)
6 years, 5 months ago (2014-07-15 15:51:14 UTC) #56
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 5 months ago (2014-07-16 00:13:03 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/140001
6 years, 5 months ago (2014-07-16 00:17:38 UTC) #58
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_compile_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-16 05:50:12 UTC) #59
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-16 06:00:06 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_compile_dbg/builds/38401)
6 years, 5 months ago (2014-07-16 06:00:07 UTC) #61
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 5 months ago (2014-07-17 17:39:39 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/356463008/160001
6 years, 5 months ago (2014-07-17 17:41:31 UTC) #63
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 03:36:15 UTC) #64
Message was sent while issue was closed.
Change committed as 283995

Powered by Google App Engine
This is Rietveld 408576698