| Index: chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller_unittest.mm
|
| index cf89bbcfb00e9748c6457e2153ebd380d88538b0..a263e9f57ec168a8d065d690dacdb0dda3e49936 100644
|
| --- a/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller_unittest.mm
|
| @@ -39,7 +39,6 @@
|
| - (void)onBlock:(id)sender;
|
| - (void)onCustomize:(id)sender;
|
| - (void)onCheckboxChanged:(id)sender;
|
| -+ (NSInteger)getFullscreenLeftOffset;
|
| @end
|
|
|
| @interface SplitBlockButton (ExposedForTesting)
|
| @@ -393,6 +392,9 @@ TEST_F(PermissionBubbleControllerTest, AnchorPositionWithLocationBar) {
|
| }
|
|
|
| TEST_F(PermissionBubbleControllerTest, AnchorPositionWithoutLocationBar) {
|
| + // Constant offset from the left to use for fullscreen permission bubbles.
|
| + const NSInteger kFullscreenLeftOffset = 40;
|
| +
|
| base::mac::ScopedObjCClassSwizzler locationSwizzle(
|
| [PermissionBubbleController class], [MockBubbleNoLocationBar class],
|
| @selector(hasVisibleLocationBarForBrowser:));
|
| @@ -402,9 +404,8 @@ TEST_F(PermissionBubbleControllerTest, AnchorPositionWithoutLocationBar) {
|
| // Expected anchor location will be top left when there's no location bar.
|
| NSWindow* window = browser()->window()->GetNativeWindow();
|
| NSRect frame = [[window contentView] frame];
|
| - NSPoint expected = NSMakePoint(
|
| - NSMinX(frame) + [PermissionBubbleController getFullscreenLeftOffset],
|
| - NSMaxY(frame));
|
| + NSPoint expected =
|
| + NSMakePoint(NSMinX(frame) + kFullscreenLeftOffset, NSMaxY(frame));
|
| expected = ui::ConvertPointFromWindowToScreen(window, expected);
|
| EXPECT_NSEQ(expected, anchor);
|
| }
|
|
|