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

Issue 7129009: Fix ProfileManagerTest.CreateProfileAsync failures on cros. (Closed)

Created:
9 years, 6 months ago by jam
Modified:
9 years, 6 months ago
CC:
chromium-reviews, rginda+watch_chromium.org, achuith+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix ProfileManagerTest.CreateProfileAsync failures on cros. Per Alexey's debugging, the problem was because NotificationUIManager was being deleted after the testing PrefsService has gone away. So when the TestingBrowserProcess is told that PrefsService is going away, destruct the NotificationUIManager then. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88362

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -8 lines) Patch
M chrome/browser/profiles/profile_manager_unittest.cc View 4 chunks +0 lines, -8 lines 0 comments Download
M chrome/test/testing_browser_process.cc View 1 2 1 chunk +2 lines, -0 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
jam
9 years, 6 months ago (2011-06-08 16:39:30 UTC) #1
Scott Hess - ex-Googler
LGTM. http://codereview.chromium.org/7129009/diff/5001/chrome/test/testing_browser_process.cc File chrome/test/testing_browser_process.cc (right): http://codereview.chromium.org/7129009/diff/5001/chrome/test/testing_browser_process.cc#newcode241 chrome/test/testing_browser_process.cc:241: notification_ui_manager_.reset(); // Used local_state_. Wouldn't this (potentially) apply ...
9 years, 6 months ago (2011-06-08 16:43:43 UTC) #2
jam
9 years, 6 months ago (2011-06-08 16:48:27 UTC) #3
http://codereview.chromium.org/7129009/diff/5001/chrome/test/testing_browser_...
File chrome/test/testing_browser_process.cc (right):

http://codereview.chromium.org/7129009/diff/5001/chrome/test/testing_browser_...
chrome/test/testing_browser_process.cc:241: notification_ui_manager_.reset(); 
// Used local_state_.
On 2011/06/08 16:43:43, shess wrote:
> Wouldn't this (potentially) apply in any case where local_state !=
local_state_?

I thought about trying to add fancier checks initially.  But if someone changes
the PrefsService, which doesn't happen now, I would guess that other stuff
breaks as is.  So I decided to do the minimal fix.  Note that the tests now are
into varieties: create (one) prefsservice or not.  The prefsservice must have
been set before NotificationUIManager is created, since it uses it in its
construction.  So if notification_ui_manager_ is set, we know that local_state_
must have been set.

Powered by Google App Engine
This is Rietveld 408576698