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
3 // found in the LICENSE file.
5 #import <Cocoa/Cocoa.h>
7 #include "base/debug/debugger.h"
8 #include "chrome/app/chrome_command_ids.h"
9 #import "chrome/browser/ui/cocoa/chrome_browser_window.h"
10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #import "testing/gtest_mac.h"
13 #include "testing/platform_test.h"
15 class ChromeBrowserWindowTest : public CocoaTest {
17 void SetUp() override {
20 const NSUInteger mask = NSTitledWindowMask | NSClosableWindowMask |
21 NSMiniaturizableWindowMask | NSResizableWindowMask;
22 window_ = [[ChromeBrowserWindow alloc]
23 initWithContentRect:NSMakeRect(0, 0, 800, 600)
25 backing:NSBackingStoreBuffered
27 if (base::debug::BeingDebugged()) {
28 [window_ orderFront:nil];
30 [window_ orderBack:nil];
34 void TearDown() override {
36 CocoaTest::TearDown();
39 ChromeBrowserWindow* window_;
42 // Baseline test that the window creates, displays, closes, and
44 TEST_F(ChromeBrowserWindowTest, ShowAndClose) {