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

Side by Side Diff: chrome/browser/cocoa/preferences_window_controller_unittest.mm

Issue 102015: Add a very basic preferences window controller with unit test. Fix the prefs ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698