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

Side by Side Diff: rlz/test/rlz_test_helpers.cc

Issue 591483002: Only send C2F ping for a search through homepage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « rlz/test/rlz_test_helpers.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Main entry point for all unit tests. 5 // Main entry point for all unit tests.
6 6
7 #include "rlz_test_helpers.h" 7 #include "rlz_test_helpers.h"
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 base::win::RegKey key( 118 base::win::RegKey key(
119 HKEY_LOCAL_MACHINE, kHKLMAccessProviders, KEY_ALL_ACCESS); 119 HKEY_LOCAL_MACHINE, kHKLMAccessProviders, KEY_ALL_ACCESS);
120 WriteRegistryTree(data, &key); 120 WriteRegistryTree(data, &key);
121 } 121 }
122 } 122 }
123 123
124 } // namespace 124 } // namespace
125 125
126 #endif // defined(OS_WIN) 126 #endif // defined(OS_WIN)
127 127
128 void RlzLibTestNoMachineState::SetUp() { 128 void RlzLibTestNoMachineStateHelper::SetUp() {
129 #if defined(OS_WIN) 129 #if defined(OS_WIN)
130 InitializeRegistryOverridesForTesting(&override_manager_); 130 InitializeRegistryOverridesForTesting(&override_manager_);
131 #elif defined(OS_MACOSX) 131 #elif defined(OS_MACOSX)
132 base::mac::ScopedNSAutoreleasePool pool; 132 base::mac::ScopedNSAutoreleasePool pool;
133 #endif // defined(OS_WIN) 133 #endif // defined(OS_WIN)
134 #if defined(OS_POSIX) 134 #if defined(OS_POSIX)
135 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 135 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
136 rlz_lib::testing::SetRlzStoreDirectory(temp_dir_.path()); 136 rlz_lib::testing::SetRlzStoreDirectory(temp_dir_.path());
137 #endif // defined(OS_POSIX) 137 #endif // defined(OS_POSIX)
138 } 138 }
139 139
140 void RlzLibTestNoMachineState::TearDown() { 140 void RlzLibTestNoMachineStateHelper::TearDown() {
141 #if defined(OS_POSIX) 141 #if defined(OS_POSIX)
142 rlz_lib::testing::SetRlzStoreDirectory(base::FilePath()); 142 rlz_lib::testing::SetRlzStoreDirectory(base::FilePath());
143 #endif // defined(OS_POSIX) 143 #endif // defined(OS_POSIX)
144 } 144 }
145 145
146 void RlzLibTestNoMachineState::SetUp() {
147 m_rlz_test_helper_.SetUp();
148 }
149
150 void RlzLibTestNoMachineState::TearDown() {
151 m_rlz_test_helper_.TearDown();
152 }
153
146 void RlzLibTestBase::SetUp() { 154 void RlzLibTestBase::SetUp() {
147 RlzLibTestNoMachineState::SetUp(); 155 RlzLibTestNoMachineState::SetUp();
148 #if defined(OS_WIN) 156 #if defined(OS_WIN)
149 rlz_lib::CreateMachineState(); 157 rlz_lib::CreateMachineState();
150 #endif // defined(OS_WIN) 158 #endif // defined(OS_WIN)
151 } 159 }
OLDNEW
« no previous file with comments | « rlz/test/rlz_test_helpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698