| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "chrome/browser/tabs/tab_strip_model.h" | 8 #include "chrome/browser/tabs/tab_strip_model.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 return exitLabel_; | 40 return exitLabel_; |
| 41 } | 41 } |
| 42 @end | 42 @end |
| 43 | 43 |
| 44 class FullscreenExitBubbleControllerTest : public CocoaProfileTest { | 44 class FullscreenExitBubbleControllerTest : public CocoaProfileTest { |
| 45 public: | 45 public: |
| 46 virtual void SetUp() { | 46 virtual void SetUp() { |
| 47 CocoaProfileTest::SetUp(); | 47 CocoaProfileTest::SetUp(); |
| 48 ASSERT_TRUE(profile()); | 48 ASSERT_TRUE(profile()); |
| 49 | 49 |
| 50 site_instance_ = SiteInstance::CreateSiteInstance(profile()); | 50 site_instance_ = SiteInstance::Create(profile()); |
| 51 controller_.reset( | 51 controller_.reset( |
| 52 [[FullscreenExitBubbleController alloc] initWithOwner:nil | 52 [[FullscreenExitBubbleController alloc] initWithOwner:nil |
| 53 browser:browser() | 53 browser:browser() |
| 54 url:GURL() | 54 url:GURL() |
| 55 bubbleType:FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION]); | 55 bubbleType:FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION]); |
| 56 EXPECT_TRUE([controller_ window]); | 56 EXPECT_TRUE([controller_ window]); |
| 57 } | 57 } |
| 58 | 58 |
| 59 virtual void TearDown() { | 59 virtual void TearDown() { |
| 60 [controller_ close]; | 60 [controller_ close]; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 TEST_F(FullscreenExitBubbleControllerTest, ShortcutText) { | 116 TEST_F(FullscreenExitBubbleControllerTest, ShortcutText) { |
| 117 ui::AcceleratorCocoa cmd_F(@"F", NSCommandKeyMask); | 117 ui::AcceleratorCocoa cmd_F(@"F", NSCommandKeyMask); |
| 118 ui::AcceleratorCocoa cmd_shift_f(@"f", NSCommandKeyMask|NSShiftKeyMask); | 118 ui::AcceleratorCocoa cmd_shift_f(@"f", NSCommandKeyMask|NSShiftKeyMask); |
| 119 NSString* cmd_F_text = [FullscreenExitBubbleController | 119 NSString* cmd_F_text = [FullscreenExitBubbleController |
| 120 keyCombinationForAccelerator:cmd_F]; | 120 keyCombinationForAccelerator:cmd_F]; |
| 121 NSString* cmd_shift_f_text = [FullscreenExitBubbleController | 121 NSString* cmd_shift_f_text = [FullscreenExitBubbleController |
| 122 keyCombinationForAccelerator:cmd_shift_f]; | 122 keyCombinationForAccelerator:cmd_shift_f]; |
| 123 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text); | 123 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text); |
| 124 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text); | 124 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text); |
| 125 } | 125 } |
| OLD | NEW |