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

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

Issue 1154013009: [OSX] Don't create deferred windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « ui/message_center/cocoa/popup_controller.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // the fullscreen transition to fail. 453 // the fullscreen transition to fail.
454 TEST_F(BridgedNativeWidgetSimulateFullscreenTest, FailToEnterAndExit) { 454 TEST_F(BridgedNativeWidgetSimulateFullscreenTest, FailToEnterAndExit) {
455 if (base::mac::IsOSSnowLeopard()) 455 if (base::mac::IsOSSnowLeopard())
456 return; 456 return;
457 457
458 base::scoped_nsobject<NSWindow> owned_window( 458 base::scoped_nsobject<NSWindow> owned_window(
459 [[BridgedNativeWidgetTestFullScreenWindow alloc] 459 [[BridgedNativeWidgetTestFullScreenWindow alloc]
460 initWithContentRect:NSMakeRect(50, 50, 400, 300) 460 initWithContentRect:NSMakeRect(50, 50, 400, 300)
461 styleMask:NSBorderlessWindowMask 461 styleMask:NSBorderlessWindowMask
462 backing:NSBackingStoreBuffered 462 backing:NSBackingStoreBuffered
463 defer:YES]); 463 defer:NO]);
464 [owned_window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. 464 [owned_window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject.
465 bridge()->Init(owned_window, init_params_); // Transfers ownership. 465 bridge()->Init(owned_window, init_params_); // Transfers ownership.
466 466
467 BridgedNativeWidgetTestFullScreenWindow* window = 467 BridgedNativeWidgetTestFullScreenWindow* window =
468 base::mac::ObjCCastStrict<BridgedNativeWidgetTestFullScreenWindow>( 468 base::mac::ObjCCastStrict<BridgedNativeWidgetTestFullScreenWindow>(
469 widget_->GetNativeWindow()); 469 widget_->GetNativeWindow());
470 widget_->Show(); 470 widget_->Show();
471 471
472 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; 472 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
473 473
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 [center postNotificationName:NSWindowDidExitFullScreenNotification 515 [center postNotificationName:NSWindowDidExitFullScreenNotification
516 object:window]; 516 object:window];
517 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change. 517 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change.
518 EXPECT_FALSE(bridge()->target_fullscreen_state()); 518 EXPECT_FALSE(bridge()->target_fullscreen_state());
519 519
520 widget_->CloseNow(); 520 widget_->CloseNow();
521 } 521 }
522 522
523 } // namespace test 523 } // namespace test
524 } // namespace views 524 } // namespace views
OLDNEW
« no previous file with comments | « ui/message_center/cocoa/popup_controller.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698