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

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

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Next iteration Created 9 years, 10 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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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/options/preferences_window_controller.h" 5 #import "chrome/browser/ui/cocoa/options/preferences_window_controller.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #import "base/scoped_nsobject.h" 9 #import "base/scoped_nsobject.h"
10 #include "chrome/browser/ui/cocoa/browser_test_helper.h" 10 #include "chrome/browser/ui/cocoa/browser_test_helper.h"
(...skipping 19 matching lines...) Expand all
30 gotNotification_ = YES; 30 gotNotification_ = YES;
31 } 31 }
32 @end 32 @end
33 33
34 namespace { 34 namespace {
35 35
36 class PrefsControllerTest : public CocoaTest { 36 class PrefsControllerTest : public CocoaTest {
37 public: 37 public:
38 virtual void SetUp() { 38 virtual void SetUp() {
39 CocoaTest::SetUp(); 39 CocoaTest::SetUp();
40 // The metrics reporting pref is registerd on the local state object in 40 PrefService* prefs = browser_helper_.profile()->GetLocalState();
41 // real builds, but we don't have one of those for unit tests. Register
42 // it on prefs so we'll find it when we go looking.
43 PrefService* prefs = browser_helper_.profile()->GetPrefs();
44 prefs->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); 41 prefs->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false);
45 42
46 pref_controller_ = [[PreferencesWindowController alloc] 43 pref_controller_ =
47 initWithProfile:browser_helper_.profile() 44 [[PreferencesWindowController alloc]
48 initialPage:OPTIONS_PAGE_DEFAULT]; 45 initWithProfile:browser_helper_.profile()
46 localState:browser_helper_.profile()->GetLocalState()
47 initialPage:OPTIONS_PAGE_DEFAULT];
49 EXPECT_TRUE(pref_controller_); 48 EXPECT_TRUE(pref_controller_);
50 } 49 }
51 50
52 virtual void TearDown() { 51 virtual void TearDown() {
53 [pref_controller_ close]; 52 [pref_controller_ close];
54 CocoaTest::TearDown(); 53 CocoaTest::TearDown();
55 } 54 }
56 55
57 BrowserTestHelper browser_helper_; 56 BrowserTestHelper browser_helper_;
58 PreferencesWindowController* pref_controller_; 57 PreferencesWindowController* pref_controller_;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 231
233 // TODO(akalin): Figure out how to test animation; we'll need everything 232 // TODO(akalin): Figure out how to test animation; we'll need everything
234 // to stick around until the animation finishes. 233 // to stick around until the animation finishes.
235 } 234 }
236 235
237 // TODO(akalin): Figure out how to test sync controls. 236 // TODO(akalin): Figure out how to test sync controls.
238 // TODO(akalin): Figure out how to test that sync controls are not shown 237 // TODO(akalin): Figure out how to test that sync controls are not shown
239 // when there isn't a sync service. 238 // when there isn't a sync service.
240 239
241 } // namespace 240 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698