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

Side by Side Diff: chrome_elf/blacklist/test/blacklist_test.cc

Issue 2760853002: Remove use of PRODUCT_STRING_PATH in chrome_elf. (Closed)
Patch Set: compile fix Created 3 years, 9 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return; 184 return;
185 185
186 // We have to call this exported function every time this test setup runs. 186 // We have to call this exported function every time this test setup runs.
187 // If the tests are running in single process mode, the test DLL does not 187 // If the tests are running in single process mode, the test DLL does not
188 // get reloaded everytime - but we need to make sure it updates 188 // get reloaded everytime - but we need to make sure it updates
189 // appropriately. 189 // appropriately.
190 InitTestDll(); 190 InitTestDll();
191 191
192 blacklist_registry_key_.reset( 192 blacklist_registry_key_.reset(
193 new base::win::RegKey(HKEY_CURRENT_USER, 193 new base::win::RegKey(HKEY_CURRENT_USER,
194 blacklist::kRegistryBeaconPath, 194 install_static::GetRegistryPath()
195 .append(kRegistryBeaconKeyName)
196 .c_str(),
195 KEY_QUERY_VALUE | KEY_SET_VALUE)); 197 KEY_QUERY_VALUE | KEY_SET_VALUE));
196 198
197 // Find out how many dlls were blocked before the test starts. 199 // Find out how many dlls were blocked before the test starts.
198 TestDll_SuccessfullyBlocked(NULL, &num_initially_blocked_); 200 TestDll_SuccessfullyBlocked(NULL, &num_initially_blocked_);
199 } 201 }
200 202
201 void TearDown() override { 203 void TearDown() override {
202 TestDll_RemoveDllFromBlacklist(kTestDllName1); 204 TestDll_RemoveDllFromBlacklist(kTestDllName1);
203 TestDll_RemoveDllFromBlacklist(kTestDllName2); 205 TestDll_RemoveDllFromBlacklist(kTestDllName2);
204 TestDll_RemoveDllFromBlacklist(kTestDllName3); 206 TestDll_RemoveDllFromBlacklist(kTestDllName3);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 &blacklist_state); 382 &blacklist_state);
381 EXPECT_EQ(blacklist_state, blacklist::BLACKLIST_SETUP_RUNNING); 383 EXPECT_EQ(blacklist_state, blacklist::BLACKLIST_SETUP_RUNNING);
382 384
383 DWORD attempt_count = blacklist::kBeaconMaxAttempts; 385 DWORD attempt_count = blacklist::kBeaconMaxAttempts;
384 blacklist_registry_key_->ReadValueDW(blacklist::kBeaconAttemptCount, 386 blacklist_registry_key_->ReadValueDW(blacklist::kBeaconAttemptCount,
385 &attempt_count); 387 &attempt_count);
386 EXPECT_EQ(static_cast<DWORD>(0), attempt_count); 388 EXPECT_EQ(static_cast<DWORD>(0), attempt_count);
387 } 389 }
388 390
389 } // namespace 391 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698