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

Side by Side Diff: chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm

Issue 18346006: Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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/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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 virtual void TearDown() { 61 virtual void TearDown() {
62 [controller_ close]; 62 [controller_ close];
63 controller_.reset(); 63 controller_.reset();
64 CocoaProfileTest::TearDown(); 64 CocoaProfileTest::TearDown();
65 } 65 }
66 66
67 void AppendTabToStrip() { 67 void AppendTabToStrip() {
68 WebContents* web_contents = WebContents::Create( 68 WebContents* web_contents = WebContents::Create(
69 content::WebContents::CreateParams(profile(), site_instance_)); 69 content::WebContents::CreateParams(profile(), site_instance_.get()));
70 browser()->tab_strip_model()->AppendWebContents( 70 browser()->tab_strip_model()->AppendWebContents(
71 web_contents, /*foreground=*/true); 71 web_contents, /*foreground=*/true);
72 } 72 }
73 73
74 scoped_refptr<SiteInstance> site_instance_; 74 scoped_refptr<SiteInstance> site_instance_;
75 base::scoped_nsobject<FullscreenExitBubbleController> controller_; 75 base::scoped_nsobject<FullscreenExitBubbleController> controller_;
76 }; 76 };
77 77
78 // http://crbug.com/103912 78 // http://crbug.com/103912
79 TEST_F(FullscreenExitBubbleControllerTest, DISABLED_DenyExitsFullscreen) { 79 TEST_F(FullscreenExitBubbleControllerTest, DISABLED_DenyExitsFullscreen) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ui::PlatformAcceleratorCocoa cmd_F(@"F", NSCommandKeyMask); 119 ui::PlatformAcceleratorCocoa cmd_F(@"F", NSCommandKeyMask);
120 ui::PlatformAcceleratorCocoa cmd_shift_f( 120 ui::PlatformAcceleratorCocoa cmd_shift_f(
121 @"f", NSCommandKeyMask | NSShiftKeyMask); 121 @"f", NSCommandKeyMask | NSShiftKeyMask);
122 NSString* cmd_F_text = [FullscreenExitBubbleController 122 NSString* cmd_F_text = [FullscreenExitBubbleController
123 keyCombinationForAccelerator:cmd_F]; 123 keyCombinationForAccelerator:cmd_F];
124 NSString* cmd_shift_f_text = [FullscreenExitBubbleController 124 NSString* cmd_shift_f_text = [FullscreenExitBubbleController
125 keyCombinationForAccelerator:cmd_shift_f]; 125 keyCombinationForAccelerator:cmd_shift_f];
126 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text); 126 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text);
127 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text); 127 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text);
128 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698