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

Side by Side Diff: chrome/test/base/chrome_unit_test_suite.cc

Issue 323693002: Split printing utility IPC messages into its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/base/chrome_unit_test_suite.h" 5 #include "chrome/test/base/chrome_unit_test_suite.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/process/process_handle.h" 8 #include "base/process/process_handle.h"
9 #include "base/metrics/stats_table.h" 9 #include "base/metrics/stats_table.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ChromeUnitTestSuiteInitializer() {} 42 ChromeUnitTestSuiteInitializer() {}
43 virtual ~ChromeUnitTestSuiteInitializer() {} 43 virtual ~ChromeUnitTestSuiteInitializer() {}
44 44
45 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { 45 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE {
46 content_client_.reset(new ChromeContentClient); 46 content_client_.reset(new ChromeContentClient);
47 content::SetContentClient(content_client_.get()); 47 content::SetContentClient(content_client_.get());
48 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 48 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
49 #if !defined(OS_IOS) 49 #if !defined(OS_IOS)
50 browser_content_client_.reset(new chrome::ChromeContentBrowserClient()); 50 browser_content_client_.reset(new chrome::ChromeContentBrowserClient());
51 content::SetBrowserClientForTesting(browser_content_client_.get()); 51 content::SetBrowserClientForTesting(browser_content_client_.get());
52 utility_content_client_.reset(new chrome::ChromeContentUtilityClient()); 52 utility_content_client_.reset(new ChromeContentUtilityClient());
53 content::SetUtilityClientForTesting(utility_content_client_.get()); 53 content::SetUtilityClientForTesting(utility_content_client_.get());
54 #endif 54 #endif
55 55
56 TestingBrowserProcess::CreateInstance(); 56 TestingBrowserProcess::CreateInstance();
57 } 57 }
58 58
59 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { 59 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE {
60 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 60 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
61 #if !defined(OS_IOS) 61 #if !defined(OS_IOS)
62 browser_content_client_.reset(); 62 browser_content_client_.reset();
63 utility_content_client_.reset(); 63 utility_content_client_.reset();
64 #endif 64 #endif
65 content_client_.reset(); 65 content_client_.reset();
66 content::SetContentClient(NULL); 66 content::SetContentClient(NULL);
67 67
68 TestingBrowserProcess::DeleteInstance(); 68 TestingBrowserProcess::DeleteInstance();
69 } 69 }
70 70
71 private: 71 private:
72 // Client implementations for the content module. 72 // Client implementations for the content module.
73 scoped_ptr<ChromeContentClient> content_client_; 73 scoped_ptr<ChromeContentClient> content_client_;
74 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 74 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
75 #if !defined(OS_IOS) 75 #if !defined(OS_IOS)
76 scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_; 76 scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_;
77 scoped_ptr<chrome::ChromeContentUtilityClient> utility_content_client_; 77 scoped_ptr<ChromeContentUtilityClient> utility_content_client_;
78 #endif 78 #endif
79 79
80 DISALLOW_COPY_AND_ASSIGN(ChromeUnitTestSuiteInitializer); 80 DISALLOW_COPY_AND_ASSIGN(ChromeUnitTestSuiteInitializer);
81 }; 81 };
82 82
83 } // namespace 83 } // namespace
84 84
85 ChromeUnitTestSuite::ChromeUnitTestSuite(int argc, char** argv) 85 ChromeUnitTestSuite::ChromeUnitTestSuite(int argc, char** argv)
86 : ChromeTestSuite(argc, argv) {} 86 : ChromeTestSuite(argc, argv) {}
87 87
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 #if defined(OS_MACOSX) && !defined(OS_IOS) 155 #if defined(OS_MACOSX) && !defined(OS_IOS)
156 PathService::Get(base::DIR_MODULE, &resources_pack_path); 156 PathService::Get(base::DIR_MODULE, &resources_pack_path);
157 resources_pack_path = 157 resources_pack_path =
158 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); 158 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
159 #else 159 #else
160 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 160 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
161 #endif 161 #endif
162 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 162 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
163 resources_pack_path, ui::SCALE_FACTOR_NONE); 163 resources_pack_path, ui::SCALE_FACTOR_NONE);
164 } 164 }
OLDNEW
« no previous file with comments | « chrome/service/service_utility_process_host.cc ('k') | chrome/utility/chrome_content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698