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

Issue 525106: Move code duplicated in two tests up into the TestingProfile. (Closed)

Created:
10 years, 11 months ago by Robert Sesek
Modified:
9 years, 7 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews_googlegroups.com, John Grabowski, ben+cc_chromium.org, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Move code duplicated in two tests up into the TestingProfile. Move TestURLRequestContextGetter and friends from CookieTreeModelTest and CookiesWindowControllerTest into TestingProfile. In the TestingProfile, return a valid CookieMonster and URLRequstContextGetter, if CreateRequestContext() is called. Original CL: http://codereview.chromium.org/525072/show BUG=None TEST=Covered by unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35776

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -92 lines) Patch
M chrome/browser/cocoa/cookies_window_controller_unittest.mm View 10 chunks +23 lines, -51 lines 0 comments Download
M chrome/browser/cookies_tree_model_unittest.cc View 4 chunks +4 lines, -38 lines 0 comments Download
M chrome/test/testing_profile.h View 5 chunks +21 lines, -2 lines 1 comment Download
M chrome/test/testing_profile.cc View 4 chunks +39 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Robert Sesek
This fixes issues with the original CL. A Context is now only created if it ...
10 years, 11 months ago (2010-01-08 03:09:54 UTC) #1
John Grabowski
10 years, 11 months ago (2010-01-08 04:01:55 UTC) #2
LGTM

It can be tricky to change test infrastructure given the large amount of
dependancies.  Nevertheless, this is a good fix.

http://codereview.chromium.org/525106/diff/1/5
File chrome/test/testing_profile.h (right):

http://codereview.chromium.org/525106/diff/1/5#newcode105
chrome/test/testing_profile.h:105: net::CookieMonster* GetCookieMonster() {
Add comment with reference to CreateRequestContext() being needed first if you
want this, and that it's not done on-demand because....

Powered by Google App Engine
This is Rietveld 408576698