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

Issue 12785003: Implement generic CreateCopyResultCallback and RunAndQuit. (Closed)

Created:
7 years, 9 months ago by hidehiko
Modified:
7 years, 9 months ago
Reviewers:
hashimoto, kinaba
CC:
chromium-reviews, achuith+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Implement generic CreateCopyResultCallback and RunAndQuit. Many drive methods returns result via callbacks, but there are variety of types. Also, in test code, we copy the result value in the callback, and check the expectation after the invocation. As a result, many CopyResultFromXxxCallback(AndQuit) methods are defined. The methods introduced by this CL are testing utilities for the code. We can eliminate boilerplate testing utilities by this (roughly, 550-600 LoC). The actual elimination will be done in following CLs. BUG=180569 TEST=Ran unit_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187941

Patch Set 1 : #

Total comments: 17

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Update comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -14 lines) Patch
M chrome/browser/google_apis/drive_api_operations_unittest.cc View 4 chunks +7 lines, -14 lines 0 comments Download
M chrome/browser/google_apis/test_util.h View 1 2 3 chunks +135 lines, -0 lines 0 comments Download
M chrome/browser/google_apis/test_util.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
hidehiko
Thank you for your review in advance, - hidehiko
7 years, 9 months ago (2013-03-12 16:25:31 UTC) #1
hashimoto
https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h File chrome/browser/google_apis/test_util.h (right): https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h#newcode195 chrome/browser/google_apis/test_util.h:195: // architecture, so we defined lots of callback to ...
7 years, 9 months ago (2013-03-13 03:34:00 UTC) #2
kinaba
https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h File chrome/browser/google_apis/test_util.h (right): https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h#newcode260 chrome/browser/google_apis/test_util.h:260: base::is_class<T>::value && !IsMovable<T>::value, T>::InType InType; I don't feel it ...
7 years, 9 months ago (2013-03-13 04:07:44 UTC) #3
kinaba
https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h File chrome/browser/google_apis/test_util.h (right): https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h#newcode260 chrome/browser/google_apis/test_util.h:260: base::is_class<T>::value && !IsMovable<T>::value, T>::InType InType; Or even, template<typename T> ...
7 years, 9 months ago (2013-03-13 04:18:13 UTC) #4
hidehiko
Thank you for your review. PTAL? https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h File chrome/browser/google_apis/test_util.h (right): https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h#newcode195 chrome/browser/google_apis/test_util.h:195: // architecture, so ...
7 years, 9 months ago (2013-03-13 05:42:10 UTC) #5
hashimoto
lgtm https://codereview.chromium.org/12785003/diff/32001/chrome/browser/google_apis/test_util.h File chrome/browser/google_apis/test_util.h (right): https://codereview.chromium.org/12785003/diff/32001/chrome/browser/google_apis/test_util.h#newcode257 chrome/browser/google_apis/test_util.h:257: : InTypeHelper<base::is_class<T>::value && !IsMovable<T>::value, T>, nit: Please add ...
7 years, 9 months ago (2013-03-13 06:27:52 UTC) #6
kinaba
lgtm https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h File chrome/browser/google_apis/test_util.h (right): https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h#newcode237 chrome/browser/google_apis/test_util.h:237: // 1) If argument type |T| is non-class ...
7 years, 9 months ago (2013-03-13 06:34:06 UTC) #7
hidehiko
Thank you for your review. Enqueueing to the CQ to run try server. https://codereview.chromium.org/12785003/diff/23001/chrome/browser/google_apis/test_util.h File ...
7 years, 9 months ago (2013-03-13 08:49:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/12785003/37001
7 years, 9 months ago (2013-03-13 08:49:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/12785003/37001
7 years, 9 months ago (2013-03-13 19:05:29 UTC) #10
commit-bot: I haz the power
7 years, 9 months ago (2013-03-13 20:42:58 UTC) #11
Message was sent while issue was closed.
Change committed as 187941

Powered by Google App Engine
This is Rietveld 408576698