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

Unified Diff: chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm

Issue 789403002: Rename fullscreen_exit_bubble_* to exclusive_access_bubble_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac build breaks Created 6 years 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
Index: chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm
similarity index 76%
rename from chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm
rename to chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm
index 42e6b078b74964b94a8b385b860d441b4650c3c6..6af760ce24024fe55021a41fab332a8e647d92f5 100644
--- a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h"
+#import "chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h"
#include "base/mac/mac_util.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -22,19 +22,19 @@
using content::SiteInstance;
using content::WebContents;
-@interface FullscreenExitBubbleController(JustForTesting)
+@interface ExclusiveAccessBubbleWindowController(JustForTesting)
// Already defined.
+ (NSString*)keyCommandString;
+ (NSString*)keyCombinationForAccelerator:
(const ui::PlatformAcceleratorCocoa&)item;
@end
-@interface FullscreenExitBubbleController(ExposedForTesting)
+@interface ExclusiveAccessBubbleWindowController(ExposedForTesting)
- (NSTextField*)exitLabelPlaceholder;
- (NSTextView*)exitLabel;
@end
-@implementation FullscreenExitBubbleController(ExposedForTesting)
+@implementation ExclusiveAccessBubbleWindowController(ExposedForTesting)
- (NSTextField*)exitLabelPlaceholder {
return exitLabelPlaceholder_;
}
@@ -44,7 +44,7 @@ using content::WebContents;
}
@end
-class FullscreenExitBubbleControllerTest : public CocoaProfileTest {
+class ExclusiveAccessBubbleWindowControllerTest : public CocoaProfileTest {
public:
virtual void SetUp() {
CocoaProfileTest::SetUp();
@@ -52,10 +52,10 @@ class FullscreenExitBubbleControllerTest : public CocoaProfileTest {
site_instance_ = SiteInstance::Create(profile());
controller_.reset(
- [[FullscreenExitBubbleController alloc] initWithOwner:nil
+ [[ExclusiveAccessBubbleWindowController alloc] initWithOwner:nil
browser:browser()
url:GURL()
- bubbleType:FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION]);
+ bubbleType:EAB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION]);
EXPECT_TRUE([controller_ window]);
}
@@ -73,11 +73,12 @@ class FullscreenExitBubbleControllerTest : public CocoaProfileTest {
}
scoped_refptr<SiteInstance> site_instance_;
- base::scoped_nsobject<FullscreenExitBubbleController> controller_;
+ base::scoped_nsobject<ExclusiveAccessBubbleWindowController> controller_;
};
// http://crbug.com/103912
-TEST_F(FullscreenExitBubbleControllerTest, DISABLED_DenyExitsFullscreen) {
+TEST_F(ExclusiveAccessBubbleWindowControllerTest,
+ DISABLED_DenyExitsFullscreen) {
NSWindow* window = browser()->window()->GetNativeWindow();
BrowserWindowController* bwc = [BrowserWindowController
browserWindowControllerForWindow:window];
@@ -97,7 +98,8 @@ TEST_F(FullscreenExitBubbleControllerTest, DISABLED_DenyExitsFullscreen) {
ASSERT_TRUE(browser()->window()->IsFullscreen());
}
- FullscreenExitBubbleController* bubble = [bwc fullscreenExitBubbleController];
+ ExclusiveAccessBubbleWindowController* bubble =
+ [bwc exclusiveAccessBubbleWindowController];
EXPECT_TRUE(bubble);
{
content::WindowedNotificationObserver fullscreen_observer(
@@ -106,23 +108,23 @@ TEST_F(FullscreenExitBubbleControllerTest, DISABLED_DenyExitsFullscreen) {
[bubble deny:nil];
fullscreen_observer.Wait();
}
- EXPECT_FALSE([bwc fullscreenExitBubbleController]);
+ EXPECT_FALSE([bwc exclusiveAccessBubbleWindowController]);
EXPECT_FALSE(browser()->window()->IsFullscreen());
CloseBrowserWindow();
}
-TEST_F(FullscreenExitBubbleControllerTest, LabelWasReplaced) {
+TEST_F(ExclusiveAccessBubbleWindowControllerTest, LabelWasReplaced) {
EXPECT_FALSE([controller_ exitLabelPlaceholder]);
EXPECT_TRUE([controller_ exitLabel]);
}
-TEST_F(FullscreenExitBubbleControllerTest, ShortcutText) {
+TEST_F(ExclusiveAccessBubbleWindowControllerTest, ShortcutText) {
ui::PlatformAcceleratorCocoa cmd_F(@"F", NSCommandKeyMask);
ui::PlatformAcceleratorCocoa cmd_shift_f(
@"f", NSCommandKeyMask | NSShiftKeyMask);
- NSString* cmd_F_text = [FullscreenExitBubbleController
+ NSString* cmd_F_text = [ExclusiveAccessBubbleWindowController
keyCombinationForAccelerator:cmd_F];
- NSString* cmd_shift_f_text = [FullscreenExitBubbleController
+ NSString* cmd_shift_f_text = [ExclusiveAccessBubbleWindowController
keyCombinationForAccelerator:cmd_shift_f];
EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text);
EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text);

Powered by Google App Engine
This is Rietveld 408576698