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

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

Issue 1849343003: mac: Remove IsOSSnowLeopard(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/mac/mac_util.h" 10 #import "base/mac/mac_util.h"
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 } 677 }
678 678
679 typedef BridgedNativeWidgetTestBase BridgedNativeWidgetSimulateFullscreenTest; 679 typedef BridgedNativeWidgetTestBase BridgedNativeWidgetSimulateFullscreenTest;
680 680
681 // Simulate the notifications that AppKit would send out if a fullscreen 681 // Simulate the notifications that AppKit would send out if a fullscreen
682 // operation begins, and then fails and must abort. This notification sequence 682 // operation begins, and then fails and must abort. This notification sequence
683 // was determined by posting delayed tasks to toggle fullscreen state and then 683 // was determined by posting delayed tasks to toggle fullscreen state and then
684 // mashing Ctrl+Left/Right to keep OSX in a transition between Spaces to cause 684 // mashing Ctrl+Left/Right to keep OSX in a transition between Spaces to cause
685 // the fullscreen transition to fail. 685 // the fullscreen transition to fail.
686 TEST_F(BridgedNativeWidgetSimulateFullscreenTest, FailToEnterAndExit) { 686 TEST_F(BridgedNativeWidgetSimulateFullscreenTest, FailToEnterAndExit) {
687 if (base::mac::IsOSSnowLeopard())
688 return;
689
690 base::scoped_nsobject<NSWindow> owned_window( 687 base::scoped_nsobject<NSWindow> owned_window(
691 [[BridgedNativeWidgetTestFullScreenWindow alloc] 688 [[BridgedNativeWidgetTestFullScreenWindow alloc]
692 initWithContentRect:NSMakeRect(50, 50, 400, 300) 689 initWithContentRect:NSMakeRect(50, 50, 400, 300)
693 styleMask:NSBorderlessWindowMask 690 styleMask:NSBorderlessWindowMask
694 backing:NSBackingStoreBuffered 691 backing:NSBackingStoreBuffered
695 defer:NO]); 692 defer:NO]);
696 [owned_window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. 693 [owned_window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject.
697 bridge()->Init(owned_window, init_params_); // Transfers ownership. 694 bridge()->Init(owned_window, init_params_); // Transfers ownership.
698 695
699 BridgedNativeWidgetTestFullScreenWindow* window = 696 BridgedNativeWidgetTestFullScreenWindow* window =
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 [center postNotificationName:NSWindowDidExitFullScreenNotification 744 [center postNotificationName:NSWindowDidExitFullScreenNotification
748 object:window]; 745 object:window];
749 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change. 746 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change.
750 EXPECT_FALSE(bridge()->target_fullscreen_state()); 747 EXPECT_FALSE(bridge()->target_fullscreen_state());
751 748
752 widget_->CloseNow(); 749 widget_->CloseNow();
753 } 750 }
754 751
755 } // namespace test 752 } // namespace test
756 } // namespace views 753 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_native_widget_interactive_uitest.mm ('k') | ui/views/cocoa/views_scrollbar_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698