| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/first_run_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/first_run_bubble_controller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
| 12 #include "chrome/test/base/testing_profile.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 class FirstRunBubbleControllerTest : public CocoaProfileTest { | 17 class FirstRunBubbleControllerTest : public CocoaProfileTest { |
| 17 }; | 18 }; |
| 18 | 19 |
| 19 // Check that the bubble doesn't crash or leak. | 20 // Check that the bubble doesn't crash or leak. |
| 20 TEST_F(FirstRunBubbleControllerTest, Init) { | 21 TEST_F(FirstRunBubbleControllerTest, Init) { |
| 21 base::scoped_nsobject<NSWindow> parent( | 22 base::scoped_nsobject<NSWindow> parent( |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 showForView:[parent.get() contentView] | 34 showForView:[parent.get() contentView] |
| 34 offset:NSMakePoint(300, 300) | 35 offset:NSMakePoint(300, 300) |
| 35 browser:NULL | 36 browser:NULL |
| 36 profile:profile()]; | 37 profile:profile()]; |
| 37 EXPECT_TRUE(controller != nil); | 38 EXPECT_TRUE(controller != nil); |
| 38 EXPECT_TRUE([[controller window] isVisible]); | 39 EXPECT_TRUE([[controller window] isVisible]); |
| 39 [parent.get() close]; | 40 [parent.get() close]; |
| 40 } | 41 } |
| 41 | 42 |
| 42 } // namespace | 43 } // namespace |
| OLD | NEW |