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

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

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/chrome_content_browser_client.h" 10 #include "chrome/browser/chrome_content_browser_client.h"
(...skipping 26 matching lines...) Expand all
37 #endif 37 #endif
38 38
39 namespace { 39 namespace {
40 40
41 // Creates a TestingBrowserProcess for each test. 41 // Creates a TestingBrowserProcess for each test.
42 class ChromeUnitTestSuiteInitializer : public testing::EmptyTestEventListener { 42 class ChromeUnitTestSuiteInitializer : public testing::EmptyTestEventListener {
43 public: 43 public:
44 ChromeUnitTestSuiteInitializer() {} 44 ChromeUnitTestSuiteInitializer() {}
45 virtual ~ChromeUnitTestSuiteInitializer() {} 45 virtual ~ChromeUnitTestSuiteInitializer() {}
46 46
47 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { 47 virtual void OnTestStart(const testing::TestInfo& test_info) override {
48 content_client_.reset(new ChromeContentClient); 48 content_client_.reset(new ChromeContentClient);
49 content::SetContentClient(content_client_.get()); 49 content::SetContentClient(content_client_.get());
50 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 50 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
51 #if !defined(OS_IOS) 51 #if !defined(OS_IOS)
52 browser_content_client_.reset(new chrome::ChromeContentBrowserClient()); 52 browser_content_client_.reset(new chrome::ChromeContentBrowserClient());
53 content::SetBrowserClientForTesting(browser_content_client_.get()); 53 content::SetBrowserClientForTesting(browser_content_client_.get());
54 utility_content_client_.reset(new ChromeContentUtilityClient()); 54 utility_content_client_.reset(new ChromeContentUtilityClient());
55 content::SetUtilityClientForTesting(utility_content_client_.get()); 55 content::SetUtilityClientForTesting(utility_content_client_.get());
56 #endif 56 #endif
57 57
58 TestingBrowserProcess::CreateInstance(); 58 TestingBrowserProcess::CreateInstance();
59 } 59 }
60 60
61 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { 61 virtual void OnTestEnd(const testing::TestInfo& test_info) override {
62 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 62 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
63 #if !defined(OS_IOS) 63 #if !defined(OS_IOS)
64 browser_content_client_.reset(); 64 browser_content_client_.reset();
65 utility_content_client_.reset(); 65 utility_content_client_.reset();
66 #endif 66 #endif
67 content_client_.reset(); 67 content_client_.reset();
68 content::SetContentClient(NULL); 68 content::SetContentClient(NULL);
69 69
70 TestingBrowserProcess::DeleteInstance(); 70 TestingBrowserProcess::DeleteInstance();
71 } 71 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 #if defined(OS_MACOSX) && !defined(OS_IOS) 152 #if defined(OS_MACOSX) && !defined(OS_IOS)
153 PathService::Get(base::DIR_MODULE, &resources_pack_path); 153 PathService::Get(base::DIR_MODULE, &resources_pack_path);
154 resources_pack_path = 154 resources_pack_path =
155 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); 155 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
156 #else 156 #else
157 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 157 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
158 #endif 158 #endif
159 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 159 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
160 resources_pack_path, ui::SCALE_FACTOR_NONE); 160 resources_pack_path, ui::SCALE_FACTOR_NONE);
161 } 161 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_unit_test_suite.h ('k') | chrome/test/base/extension_load_waiter_one_shot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698