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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window_unittest.mm

Issue 10870094: Constrained window sheet controller (test patch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Created 8 years, 3 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 "base/memory/scoped_nsobject.h" 5 #import "base/memory/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/constrained_window/cw_window.h" 6 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h"
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
8 8
9 class CWWindowTest : public CocoaTest { 9 class ConstrainedWindowCustomWindowTest : public CocoaTest {
10 }; 10 };
11 11
12 TEST_F(CWWindowTest, Basic) { 12 // Simply test creating and drawing the window.
13 CWWindow* window = 13 TEST_F(ConstrainedWindowCustomWindowTest, Basic) {
14 [[CWWindow alloc] initWithContentRect:NSMakeRect(0, 0, 10, 10)]; 14 ConstrainedWindowCustomWindow* window = [[ConstrainedWindowCustomWindow alloc]
15 initWithContentRect:NSMakeRect(0, 0, 10, 10)];
15 EXPECT_TRUE([window canBecomeKeyWindow]); 16 EXPECT_TRUE([window canBecomeKeyWindow]);
16 EXPECT_FALSE([window canBecomeMainWindow]); 17 EXPECT_FALSE([window canBecomeMainWindow]);
17 18
18 [window makeKeyAndOrderFront:nil]; 19 [window makeKeyAndOrderFront:nil];
19 [window display]; 20 [window display];
20 [window close]; 21 [window close];
21 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698