OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/exclusive_access_bubble_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h" |
6 | 6 |
7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" | 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 [bwc showWindow:nil]; | 86 [bwc showWindow:nil]; |
87 | 87 |
88 AppendTabToStrip(); | 88 AppendTabToStrip(); |
89 WebContents* fullscreen_tab = | 89 WebContents* fullscreen_tab = |
90 browser()->tab_strip_model()->GetActiveWebContents(); | 90 browser()->tab_strip_model()->GetActiveWebContents(); |
91 { | 91 { |
92 base::mac::ScopedNSAutoreleasePool pool; | 92 base::mac::ScopedNSAutoreleasePool pool; |
93 content::WindowedNotificationObserver fullscreen_observer( | 93 content::WindowedNotificationObserver fullscreen_observer( |
94 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 94 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
95 content::NotificationService::AllSources()); | 95 content::NotificationService::AllSources()); |
96 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); | 96 browser()->EnterFullscreenModeForTab(fullscreen_tab, GURL()); |
97 fullscreen_observer.Wait(); | 97 fullscreen_observer.Wait(); |
98 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 98 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
99 } | 99 } |
100 | 100 |
101 ExclusiveAccessBubbleWindowController* bubble = | 101 ExclusiveAccessBubbleWindowController* bubble = |
102 [bwc exclusiveAccessBubbleWindowController]; | 102 [bwc exclusiveAccessBubbleWindowController]; |
103 EXPECT_TRUE(bubble); | 103 EXPECT_TRUE(bubble); |
104 { | 104 { |
105 content::WindowedNotificationObserver fullscreen_observer( | 105 content::WindowedNotificationObserver fullscreen_observer( |
106 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 106 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
(...skipping 15 matching lines...) Expand all Loading... |
122 ui::PlatformAcceleratorCocoa cmd_F(@"F", NSCommandKeyMask); | 122 ui::PlatformAcceleratorCocoa cmd_F(@"F", NSCommandKeyMask); |
123 ui::PlatformAcceleratorCocoa cmd_shift_f(@"f", | 123 ui::PlatformAcceleratorCocoa cmd_shift_f(@"f", |
124 NSCommandKeyMask | NSShiftKeyMask); | 124 NSCommandKeyMask | NSShiftKeyMask); |
125 NSString* cmd_F_text = [ExclusiveAccessBubbleWindowController | 125 NSString* cmd_F_text = [ExclusiveAccessBubbleWindowController |
126 keyCombinationForAccelerator:cmd_F]; | 126 keyCombinationForAccelerator:cmd_F]; |
127 NSString* cmd_shift_f_text = [ExclusiveAccessBubbleWindowController | 127 NSString* cmd_shift_f_text = [ExclusiveAccessBubbleWindowController |
128 keyCombinationForAccelerator:cmd_shift_f]; | 128 keyCombinationForAccelerator:cmd_shift_f]; |
129 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text); | 129 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text); |
130 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text); | 130 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text); |
131 } | 131 } |
OLD | NEW |