New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 854113 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Tests should not use category to expose tested class private methods

Project Member Reported by sdefresne@chromium.org, Jun 19 2018

Issue description

Search (a bit to broad) returning potential tests using category to expose private methods of a tested class:

https://cs.chromium.org/search/?q=file:.*_unittest.mm+@interface%5C+%5Cw*%5C+%5C(+file:ios/&sq=package:chromium&type=cs

Example of incorrect code in ios/chrome/browser/installation_notifier_unittest.mm:

@interface InstallationNotifier (Testing)
- (void)setDispatcher:(id<DispatcherProtocol>)dispatcher;
- (void)resetDispatcher;
- (void)dispatchInstallationNotifierBlock;
- (void)registerForInstallationNotifications:(id)observer
                                withSelector:(SEL)notificationSelector
                                   forScheme:(NSString*)scheme
                                startPolling:(BOOL)poll;
- (net::BackoffEntry::Policy const*)backOffPolicy;
@end


 

Comment 1 by sczs@chromium.org, Jun 20 2018

Cc: marq@chromium.org rohitrao@chromium.org
Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)

Sign in to add a comment