| OLD | NEW | 
|---|
| 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/mac/scoped_nsobject.h" | 5 #import "base/mac/scoped_nsobject.h" | 
| 6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |  | 
| 7 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
    ndow.h" | 6 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
    ndow.h" | 
|  | 7 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 8 | 8 | 
| 9 class ConstrainedWindowCustomWindowTest : public CocoaTest { | 9 class ConstrainedWindowCustomWindowTest : public CocoaTest { | 
| 10 }; | 10 }; | 
| 11 | 11 | 
| 12 // Simply test creating and drawing the window. | 12 // Simply test creating and drawing the window. | 
| 13 TEST_F(ConstrainedWindowCustomWindowTest, Basic) { | 13 TEST_F(ConstrainedWindowCustomWindowTest, Basic) { | 
| 14   base::scoped_nsobject<ConstrainedWindowCustomWindow> window( | 14   base::scoped_nsobject<ConstrainedWindowCustomWindow> window( | 
| 15       [[ConstrainedWindowCustomWindow alloc] | 15       [[ConstrainedWindowCustomWindow alloc] | 
| 16           initWithContentRect:NSMakeRect(0, 0, 10, 10)]); | 16           initWithContentRect:NSMakeRect(0, 0, 10, 10)]); | 
| 17   EXPECT_TRUE([window canBecomeKeyWindow]); | 17   EXPECT_TRUE([window canBecomeKeyWindow]); | 
| 18   EXPECT_FALSE([window canBecomeMainWindow]); | 18   EXPECT_FALSE([window canBecomeMainWindow]); | 
| 19 | 19 | 
| 20   [window makeKeyAndOrderFront:nil]; | 20   [window makeKeyAndOrderFront:nil]; | 
| 21   [window display]; | 21   [window display]; | 
| 22   [window close]; | 22   [window close]; | 
| 23 } | 23 } | 
| OLD | NEW | 
|---|