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

Side by Side Diff: ui/views/cocoa/bridged_native_widget_unittest.mm

Issue 1917973002: mac: Remove IsOSLion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/cocoa/bridged_native_widget.h" 5 #import "ui/views/cocoa/bridged_native_widget.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 // BridgedNativeWidget will think it's just a delayed transition and try to go 709 // BridgedNativeWidget will think it's just a delayed transition and try to go
710 // back into fullscreen but get ignored by Cocoa. 710 // back into fullscreen but get ignored by Cocoa.
711 EXPECT_EQ(0, [window ignoredToggleFullScreenCount]); 711 EXPECT_EQ(0, [window ignoredToggleFullScreenCount]);
712 EXPECT_TRUE(bridge()->target_fullscreen_state()); 712 EXPECT_TRUE(bridge()->target_fullscreen_state());
713 [center postNotificationName:NSWindowDidExitFullScreenNotification 713 [center postNotificationName:NSWindowDidExitFullScreenNotification
714 object:window]; 714 object:window];
715 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); 715 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]);
716 EXPECT_FALSE(bridge()->target_fullscreen_state()); 716 EXPECT_FALSE(bridge()->target_fullscreen_state());
717 717
718 // Cocoa follows up with a failure message sent to the NSWindowDelegate (there 718 // Cocoa follows up with a failure message sent to the NSWindowDelegate (there
719 // is no equivalent notification for failure). Called via id so that this 719 // is no equivalent notification for failure).
720 // compiles on 10.6.
721 ViewsNSWindowDelegate* window_delegate = 720 ViewsNSWindowDelegate* window_delegate =
722 base::mac::ObjCCast<ViewsNSWindowDelegate>([window delegate]); 721 base::mac::ObjCCast<ViewsNSWindowDelegate>([window delegate]);
723 [window_delegate windowDidFailToEnterFullScreen:window]; 722 [window_delegate windowDidFailToEnterFullScreen:window];
724 EXPECT_FALSE(bridge()->target_fullscreen_state()); 723 EXPECT_FALSE(bridge()->target_fullscreen_state());
725 724
726 // Now perform a successful fullscreen operation. 725 // Now perform a successful fullscreen operation.
727 [center postNotificationName:NSWindowWillEnterFullScreenNotification 726 [center postNotificationName:NSWindowWillEnterFullScreenNotification
728 object:window]; 727 object:window];
729 EXPECT_TRUE(bridge()->target_fullscreen_state()); 728 EXPECT_TRUE(bridge()->target_fullscreen_state());
730 [center postNotificationName:NSWindowDidEnterFullScreenNotification 729 [center postNotificationName:NSWindowDidEnterFullScreenNotification
(...skipping 12 matching lines...) Expand all
743 [center postNotificationName:NSWindowDidExitFullScreenNotification 742 [center postNotificationName:NSWindowDidExitFullScreenNotification
744 object:window]; 743 object:window];
745 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change. 744 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change.
746 EXPECT_FALSE(bridge()->target_fullscreen_state()); 745 EXPECT_FALSE(bridge()->target_fullscreen_state());
747 746
748 widget_->CloseNow(); 747 widget_->CloseNow();
749 } 748 }
750 749
751 } // namespace test 750 } // namespace test
752 } // namespace views 751 } // namespace views
OLDNEW
« ui/gfx/mac/nswindow_frame_controls.mm ('K') | « ui/gl/gpu_switching_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698