New issue
Advanced search Search tips

Issue 750945 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

TranslateManagerRenderViewHostTest.AlwaysTranslateLanguagePref and TranslateManagerRenderViewHostTest.BeforeTranslateExtraButtons do Bad Things

Project Member Reported by mmenke@chromium.org, Aug 1 2017

Issue description

These two tests create duplicate TestProfiles for a single BrowserContext. Normally, the Profile *is* the BrowserContext, so this creates a weird situation.  Generally, a BrowserContextKeyedService is used for only one Profile, which has a single StoragePartition.

However, in these two tests, BrowserContextKeyedServices are shared by both Profiles (Since they have the same BrowserContext), but each profile also has its own StoragePartition.

I'm working on separating out the network code (ProfileIOData) from being attached to the Profile to being attached to the StoragePartition, but I'm also using a BrowserContextKeyedService to hold onto objects Chrome-side.  One service with two Profiles doesn't work very well.

I've been trying to switch the tests over to use TestingProfile::BuildIncognito() - that does fixes the crashes the tests run into with my CL, but it makes the tests fail.  :(
 

Comment 1 by napper@chromium.org, Aug 11 2017

Owner: napper@chromium.org
Status: assigned (was: Untriaged)

Comment 2 by mmenke@chromium.org, Aug 11 2017

Worth noting I've found a workaround (Going through the Profile on the way to the BrowserContextKeyedService, so the TestingProfile can bypass the network service).  It would be nice if we don't have to rely on that long term.  Either way, I still think this is something other BrowserContextKeyedServices may run into in tests.

Comment 3 by napper@chromium.org, Aug 22 2017

Owner: ----
Status: Available (was: Assigned)
Labels: -Pri-1 Pri-3
Cc: yyushkina@chromium.org anthonyvd@chromium.org

Sign in to add a comment