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

Unified Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm

Issue 1140223003: [PermissionBubble] identical ctor across platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permbubble
Patch Set: Fixed nullptr/NULL/nil issues Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm
index af34247c34f1ee8023a6c26c75e2593e760adf87..e9928d53b2c3e23c917a5c500f9ae070eb297344 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm
@@ -14,8 +14,8 @@
namespace {
class MockPermissionBubbleCocoa : public PermissionBubbleCocoa {
public:
- MockPermissionBubbleCocoa(NSWindow* parent_window)
- : PermissionBubbleCocoa(parent_window) {}
+ MockPermissionBubbleCocoa(Browser* browser)
+ : PermissionBubbleCocoa(browser) {}
MOCK_METHOD0(HasLocationBar, bool());
@@ -25,7 +25,7 @@ class MockPermissionBubbleCocoa : public PermissionBubbleCocoa {
}
IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest, HasLocationBarByDefault) {
- PermissionBubbleCocoa bubble(browser()->window()->GetNativeWindow());
+ PermissionBubbleCocoa bubble(browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
EXPECT_TRUE(bubble.HasLocationBar());
@@ -33,7 +33,7 @@ IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest, HasLocationBarByDefault) {
}
IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest, FullscreenHasLocationBar) {
- PermissionBubbleCocoa bubble(browser()->window()->GetNativeWindow());
+ PermissionBubbleCocoa bubble(browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
@@ -50,7 +50,7 @@ IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest, FullscreenHasLocationBar) {
}
IN_PROC_BROWSER_TEST_F(PermissionBubbleAppBrowserTest, AppHasNoLocationBar) {
- PermissionBubbleCocoa bubble(app_browser()->window()->GetNativeWindow());
+ PermissionBubbleCocoa bubble(app_browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
EXPECT_FALSE(bubble.HasLocationBar());
@@ -61,7 +61,7 @@ IN_PROC_BROWSER_TEST_F(PermissionBubbleAppBrowserTest, AppHasNoLocationBar) {
// Kiosk mode on Mac has a location bar but it shouldn't.
IN_PROC_BROWSER_TEST_F(PermissionBubbleKioskBrowserTest,
DISABLED_KioskHasNoLocationBar) {
- PermissionBubbleCocoa bubble(browser()->window()->GetNativeWindow());
+ PermissionBubbleCocoa bubble(browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
EXPECT_FALSE(bubble.HasLocationBar());
@@ -70,8 +70,7 @@ IN_PROC_BROWSER_TEST_F(PermissionBubbleKioskBrowserTest,
IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest,
AnchorPositionWithLocationBar) {
- testing::NiceMock<MockPermissionBubbleCocoa> bubble(
- browser()->window()->GetNativeWindow());
+ testing::NiceMock<MockPermissionBubbleCocoa> bubble(browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
ON_CALL(bubble, HasLocationBar()).WillByDefault(testing::Return(true));
@@ -91,8 +90,7 @@ IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest,
IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest,
AnchorPositionWithoutLocationBar) {
- testing::NiceMock<MockPermissionBubbleCocoa> bubble(
- browser()->window()->GetNativeWindow());
+ testing::NiceMock<MockPermissionBubbleCocoa> bubble(browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
ON_CALL(bubble, HasLocationBar()).WillByDefault(testing::Return(false));
@@ -110,8 +108,7 @@ IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest,
IN_PROC_BROWSER_TEST_F(PermissionBubbleBrowserTest,
AnchorPositionDifferentWithAndWithoutLocationBar) {
- testing::NiceMock<MockPermissionBubbleCocoa> bubble(
- browser()->window()->GetNativeWindow());
+ testing::NiceMock<MockPermissionBubbleCocoa> bubble(browser());
bubble.SetDelegate(test_delegate());
bubble.Show(requests(), accept_states());
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698