New issue
Advanced search Search tips

Issue 785238 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment

BVC unit tests DCHECK if any tab helpers need JS injection.

Project Member Reported by marq@chromium.org, Nov 15 2017

Issue description

The setup for the BrowserViewControllerTest fixture creates a real webState with a mock WebController; this means that webState->GetJSInjectionReceiver() returns nil for this webState. Tab helpers which DCHECK for a non-nil injection manager that are initialized during installDelegatesForTab: will thus encounter such DCHECKs in the BVC unit tests. ChromeIOSTranslateClient is an example of such a tab helper.

Currently [BVC installDelegatesForTab:] checks that the tab's webState has a non-nil injection manager, but this is ugly and fragile. 

The ideal fix would be to have the BVC tests use a fully-functional WebController instead of a mocked one.

 
Labels: -Type-Bug -Pri-2 Pri-3 Type-Task
Project Member

Comment 2 by sheriffbot@chromium.org, Nov 28

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: edchin@chromium.org
Status: Assigned (was: Untriaged)
Ed, this might be something to keep in mind while doing the BVC refactor.

Sign in to add a comment