OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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. |
| 4 |
| 5 #import <Cocoa/Cocoa.h> |
| 6 |
| 7 #import "base/scoped_nsobject.h" |
| 8 #import "chrome/browser/cocoa/preferences_window_controller.h" |
| 9 #include "chrome/browser/cocoa/browser_test_helper.h" |
| 10 #include "chrome/browser/cocoa/cocoa_test_helper.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "testing/platform_test.h" |
| 13 |
| 14 namespace { |
| 15 |
| 16 class PrefsControllerTest : public PlatformTest { |
| 17 public: |
| 18 PrefsControllerTest() { |
| 19 PrefService* prefs = browser_helper_.profile()->GetPrefs(); |
| 20 pref_controller_.reset([[PreferencesWindowController alloc] |
| 21 initWithPrefs:prefs]); |
| 22 EXPECT_TRUE(pref_controller_.get()); |
| 23 } |
| 24 |
| 25 BrowserTestHelper browser_helper_; |
| 26 CocoaTestHelper cocoa_helper_; // Inits Cocoa, creates window, etc... |
| 27 scoped_nsobject<PreferencesWindowController> pref_controller_; |
| 28 }; |
| 29 |
| 30 // Test showing the preferences window and making sure it's visible |
| 31 TEST_F(PrefsControllerTest, Show) { |
| 32 [pref_controller_ showPreferences:nil]; |
| 33 EXPECT_TRUE([[pref_controller_ window] isVisible]); |
| 34 } |
| 35 |
| 36 } // namespace |
OLD | NEW |