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

Issue 355223002: Add ExtensionsTestBrowserContext class for test. (Closed)

Created:
6 years, 5 months ago by limasdf
Modified:
6 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add ExtensionsTestBrowserContext class for test. and Use ExtensionTestBrowserContext for ImageLoader unittest. ExtensionsTestBrowserContext class does set TestExtensionsBrowserClient from constructor and call DestroyBrowserContextServices from destructor. ExtensionTestBrowserContext will be used instead of TestingProfile. R=yoz@chromium.org, rdevlin@chromium.org BUG=354046 TEST=unit_tests --gtest_filter=ImageLoaderTest.DeleteExtensionWhileWaitingForCache Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284330

Patch Set 1 #

Patch Set 2 : content/DEPS doesn't allow #

Patch Set 3 : ExtensionsTestBrowserContext #

Total comments: 6

Patch Set 4 : #

Total comments: 6

Patch Set 5 : #

Total comments: 5

Patch Set 6 : move to e/browser #

Patch Set 7 : #

Total comments: 4

Patch Set 8 : make as member #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -8 lines) Patch
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A extensions/browser/extensions_test_browser_context.h View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download
A extensions/browser/extensions_test_browser_context.cc View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 1 comment Download
M extensions/browser/image_loader_unittest.cc View 1 2 3 4 5 6 2 chunks +5 lines, -8 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
limasdf
PTAL. This is part of https://codereview.chromium.org/346193002/. After struggling, I was able to find a method ...
6 years, 5 months ago (2014-06-27 17:00:00 UTC) #1
Devlin
Wow - this was tricky! You have the right problem, but you actually discovered a ...
6 years, 5 months ago (2014-06-27 22:05:54 UTC) #2
Yoyo Zhou
On 2014/06/27 22:05:54, Devlin wrote: > Wow - this was tricky! > > You have ...
6 years, 5 months ago (2014-06-28 00:10:54 UTC) #3
limasdf
On 2014/06/28 00:10:54, Yoyo Zhou (OOO till July 6) wrote: > On 2014/06/27 22:05:54, Devlin ...
6 years, 5 months ago (2014-06-29 20:32:35 UTC) #4
Devlin
On 2014/06/29 20:32:35, Sungguk Lim (OOO till July 5) wrote: > The Best way would ...
6 years, 5 months ago (2014-06-30 15:37:26 UTC) #5
limasdf
Could you take a look? Sadly, We're not able to add ""+components/keyed_service" to content/DEPS.(Patch set2). ...
6 years, 5 months ago (2014-07-14 10:42:58 UTC) #6
Devlin
This mostly lg, but would appreciate a sanity check from yoz@. https://codereview.chromium.org/355223002/diff/160001/extensions/common/extensions_test_browser_context.h File extensions/common/extensions_test_browser_context.h (right): ...
6 years, 5 months ago (2014-07-15 17:30:39 UTC) #7
Yoyo Zhou
https://codereview.chromium.org/355223002/diff/160001/chrome/chrome_tests_unit.gypi File chrome/chrome_tests_unit.gypi (right): https://codereview.chromium.org/355223002/diff/160001/chrome/chrome_tests_unit.gypi#newcode286 chrome/chrome_tests_unit.gypi:286: '../extensions/common/extensions_test_browser_context.h', I think it'd be better to put these ...
6 years, 5 months ago (2014-07-15 19:27:30 UTC) #8
limasdf
PTAL! And added +Lei for /chrome. https://codereview.chromium.org/355223002/diff/160001/chrome/chrome_tests_unit.gypi File chrome/chrome_tests_unit.gypi (right): https://codereview.chromium.org/355223002/diff/160001/chrome/chrome_tests_unit.gypi#newcode286 chrome/chrome_tests_unit.gypi:286: '../extensions/common/extensions_test_browser_context.h', On 2014/07/15 ...
6 years, 5 months ago (2014-07-16 16:10:19 UTC) #9
Lei Zhang
chrome bit lgtm
6 years, 5 months ago (2014-07-16 17:58:01 UTC) #10
Devlin
Mostly good! https://codereview.chromium.org/355223002/diff/240001/extensions/common/extensions_test_browser_context.h File extensions/common/extensions_test_browser_context.h (right): https://codereview.chromium.org/355223002/diff/240001/extensions/common/extensions_test_browser_context.h#newcode15 extensions/common/extensions_test_browser_context.h:15: // bring up a necessary settings and ...
6 years, 5 months ago (2014-07-16 20:09:50 UTC) #11
limasdf
PTAL! https://codereview.chromium.org/355223002/diff/240001/extensions/common/extensions_test_browser_context.h File extensions/common/extensions_test_browser_context.h (right): https://codereview.chromium.org/355223002/diff/240001/extensions/common/extensions_test_browser_context.h#newcode15 extensions/common/extensions_test_browser_context.h:15: // bring up a necessary settings and will ...
6 years, 5 months ago (2014-07-17 14:48:34 UTC) #12
Yoyo Zhou
https://codereview.chromium.org/355223002/diff/260001/extensions/DEPS File extensions/DEPS (right): https://codereview.chromium.org/355223002/diff/260001/extensions/DEPS#newcode2 extensions/DEPS:2: "+components/keyed_service", This should be a dep in extensions/browser rather ...
6 years, 5 months ago (2014-07-17 18:16:11 UTC) #13
Devlin
https://codereview.chromium.org/355223002/diff/260001/extensions/common/extensions_test_browser_context.cc File extensions/common/extensions_test_browser_context.cc (right): https://codereview.chromium.org/355223002/diff/260001/extensions/common/extensions_test_browser_context.cc#newcode8 extensions/common/extensions_test_browser_context.cc:8: #include "extensions/browser/extensions_browser_client.h" On 2014/07/17 18:16:10, Yoyo Zhou wrote: > ...
6 years, 5 months ago (2014-07-17 20:07:37 UTC) #14
limasdf
PTAL again. https://codereview.chromium.org/355223002/diff/260001/extensions/DEPS File extensions/DEPS (right): https://codereview.chromium.org/355223002/diff/260001/extensions/DEPS#newcode2 extensions/DEPS:2: "+components/keyed_service", On 2014/07/17 18:16:10, Yoyo Zhou wrote: ...
6 years, 5 months ago (2014-07-18 01:33:00 UTC) #15
Yoyo Zhou
https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc File extensions/browser/extensions_test_browser_context.cc (right): https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc#newcode16 extensions/browser/extensions_test_browser_context.cc:16: ExtensionsBrowserClient::Set(new TestExtensionsBrowserClient(this)); It looks like this is leaked. Can ...
6 years, 5 months ago (2014-07-18 01:47:13 UTC) #16
limasdf
I hope I understand what you mean. (Sorry about my English!) https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc File extensions/browser/extensions_test_browser_context.cc (right): ...
6 years, 5 months ago (2014-07-18 02:22:26 UTC) #17
Yoyo Zhou
https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc File extensions/browser/extensions_test_browser_context.cc (right): https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc#newcode16 extensions/browser/extensions_test_browser_context.cc:16: ExtensionsBrowserClient::Set(new TestExtensionsBrowserClient(this)); On 2014/07/18 02:22:25, Sungguk Lim wrote: > ...
6 years, 5 months ago (2014-07-18 02:38:45 UTC) #18
limasdf
Could you take a look? https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc File extensions/browser/extensions_test_browser_context.cc (right): https://codereview.chromium.org/355223002/diff/320001/extensions/browser/extensions_test_browser_context.cc#newcode16 extensions/browser/extensions_test_browser_context.cc:16: ExtensionsBrowserClient::Set(new TestExtensionsBrowserClient(this)); On 2014/07/18 ...
6 years, 5 months ago (2014-07-18 06:48:12 UTC) #19
Yoyo Zhou
Great, LGTM
6 years, 5 months ago (2014-07-19 01:16:13 UTC) #20
limasdf
Thank you for the review!
6 years, 5 months ago (2014-07-19 04:05:41 UTC) #21
limasdf
The CQ bit was checked by limasdf@gmail.com
6 years, 5 months ago (2014-07-19 04:05:47 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/limasdf@gmail.com/355223002/360001
6 years, 5 months ago (2014-07-19 04:06:46 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 5 months ago (2014-07-19 05:51:16 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-19 05:53:04 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/builds/171868)
6 years, 5 months ago (2014-07-19 05:53:05 UTC) #26
limasdf
The CQ bit was checked by limasdf@gmail.com
6 years, 5 months ago (2014-07-19 07:18:46 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/limasdf@gmail.com/355223002/360001
6 years, 5 months ago (2014-07-19 07:19:08 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 5 months ago (2014-07-19 07:39:35 UTC) #29
commit-bot: I haz the power
Change committed as 284330
6 years, 5 months ago (2014-07-19 12:47:32 UTC) #30
James Cook
https://codereview.chromium.org/355223002/diff/360001/extensions/browser/extensions_test_browser_context.cc File extensions/browser/extensions_test_browser_context.cc (right): https://codereview.chromium.org/355223002/diff/360001/extensions/browser/extensions_test_browser_context.cc#newcode16 extensions/browser/extensions_test_browser_context.cc:16: ->CreateBrowserContextServicesForTest(this); I don't think you can do this. If ...
6 years, 5 months ago (2014-07-21 20:42:47 UTC) #31
James Cook
6 years, 5 months ago (2014-07-21 22:23:02 UTC) #32
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/406093004/ by jamescook@chromium.org.

The reason for reverting is: This is breaking the Chrome OS valgrind bots:

http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20OS%20(val...

For example:

http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20OS%20%28v...

This is a problem with mixing tests that use TestingProfile and
TestBrowserContext.  See crbug.com/395820.

Powered by Google App Engine
This is Rietveld 408576698