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

Side by Side Diff: chrome/browser/printing/print_preview_unit_test_base.cc

Issue 10698111: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/printing/print_preview_unit_test_base.h" 5 #include "chrome/browser/printing/print_preview_unit_test_base.h"
6 6
7 #include "chrome/browser/prefs/browser_prefs.h" 7 #include "chrome/browser/prefs/browser_prefs.h"
8 #include "chrome/common/pref_names.h" 8 #include "chrome/common/pref_names.h"
9 #include "chrome/test/base/testing_browser_process.h" 9 #include "chrome/test/base/testing_browser_process.h"
10 #include "chrome/test/base/testing_pref_service.h" 10 #include "chrome/test/base/testing_pref_service.h"
11 11
12 PrintPreviewUnitTestBase::PrintPreviewUnitTestBase() { 12 PrintPreviewUnitTestBase::PrintPreviewUnitTestBase() {
13 } 13 }
14 14
15 PrintPreviewUnitTestBase::~PrintPreviewUnitTestBase() { 15 PrintPreviewUnitTestBase::~PrintPreviewUnitTestBase() {
16 } 16 }
17 17
18 void PrintPreviewUnitTestBase::SetUp() { 18 void PrintPreviewUnitTestBase::SetUp() {
19 BrowserWithTestWindowTest::SetUp(); 19 BrowserWithTestWindowTest::SetUp();
20 20
21 testing_local_state_.reset(new TestingPrefService); 21 testing_local_state_.reset(new TestingPrefService);
22 testing_local_state_->SetUserPref(prefs::kPrintPreviewDisabled, 22 testing_local_state_->SetUserPref(prefs::kPrintPreviewDisabled,
23 Value::CreateBooleanValue(false)); 23 Value::CreateBooleanValue(false));
24 24
25 browser::RegisterLocalState(testing_local_state_.get()); 25 chrome::RegisterLocalState(testing_local_state_.get());
26 TestingBrowserProcess* testing_browser_process = 26 TestingBrowserProcess* testing_browser_process =
27 static_cast<TestingBrowserProcess*>(g_browser_process); 27 static_cast<TestingBrowserProcess*>(g_browser_process);
28 EXPECT_FALSE(testing_browser_process->local_state()); 28 EXPECT_FALSE(testing_browser_process->local_state());
29 testing_browser_process->SetLocalState(testing_local_state_.get()); 29 testing_browser_process->SetLocalState(testing_local_state_.get());
30 } 30 }
31 31
32 void PrintPreviewUnitTestBase::TearDown() { 32 void PrintPreviewUnitTestBase::TearDown() {
33 EXPECT_EQ(testing_local_state_.get(), g_browser_process->local_state()); 33 EXPECT_EQ(testing_local_state_.get(), g_browser_process->local_state());
34 TestingBrowserProcess* testing_browser_process = 34 TestingBrowserProcess* testing_browser_process =
35 static_cast<TestingBrowserProcess*>(g_browser_process); 35 static_cast<TestingBrowserProcess*>(g_browser_process);
36 testing_browser_process->SetLocalState(NULL); 36 testing_browser_process->SetLocalState(NULL);
37 BrowserWithTestWindowTest::TearDown(); 37 BrowserWithTestWindowTest::TearDown();
38 } 38 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/proxy_policy_unittest.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698