OLD | NEW |
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 dlls_to_block[j].c_str()); | 280 dlls_to_block[j].c_str()); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 // Remove the dlls from the blacklist now that we are done. | 284 // Remove the dlls from the blacklist now that we are done. |
285 for (const auto& dll : dlls_to_block) { | 285 for (const auto& dll : dlls_to_block) { |
286 EXPECT_TRUE(TestDll_RemoveDllFromBlacklist(dll.c_str())); | 286 EXPECT_TRUE(TestDll_RemoveDllFromBlacklist(dll.c_str())); |
287 } | 287 } |
288 } | 288 } |
289 | 289 |
290 // Disabled due to flakiness. https://crbug.com/711651. | 290 TEST_F(BlacklistTest, LoadBlacklistedLibrary) { |
291 TEST_F(BlacklistTest, DISABLED_LoadBlacklistedLibrary) { | |
292 base::FilePath current_dir; | 291 base::FilePath current_dir; |
293 ASSERT_TRUE(PathService::Get(base::DIR_EXE, ¤t_dir)); | 292 ASSERT_TRUE(PathService::Get(base::DIR_EXE, ¤t_dir)); |
294 | 293 |
295 // Ensure that the blacklist is loaded. | 294 // Ensure that the blacklist is loaded. |
296 ASSERT_TRUE(TestDll_IsBlacklistInitialized()); | 295 ASSERT_TRUE(TestDll_IsBlacklistInitialized()); |
297 | 296 |
298 // Test that an un-blacklisted DLL can load correctly. | 297 // Test that an un-blacklisted DLL can load correctly. |
299 base::ScopedNativeLibrary dll1(current_dir.Append(kTestDllName1)); | 298 base::ScopedNativeLibrary dll1(current_dir.Append(kTestDllName1)); |
300 EXPECT_TRUE(dll1.is_valid()); | 299 EXPECT_TRUE(dll1.is_valid()); |
301 dll1.Reset(NULL); | 300 dll1.Reset(NULL); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 &blacklist_state); | 383 &blacklist_state); |
385 EXPECT_EQ(blacklist_state, blacklist::BLACKLIST_SETUP_RUNNING); | 384 EXPECT_EQ(blacklist_state, blacklist::BLACKLIST_SETUP_RUNNING); |
386 | 385 |
387 DWORD attempt_count = blacklist::kBeaconMaxAttempts; | 386 DWORD attempt_count = blacklist::kBeaconMaxAttempts; |
388 blacklist_registry_key_->ReadValueDW(blacklist::kBeaconAttemptCount, | 387 blacklist_registry_key_->ReadValueDW(blacklist::kBeaconAttemptCount, |
389 &attempt_count); | 388 &attempt_count); |
390 EXPECT_EQ(static_cast<DWORD>(0), attempt_count); | 389 EXPECT_EQ(static_cast<DWORD>(0), attempt_count); |
391 } | 390 } |
392 | 391 |
393 } // namespace | 392 } // namespace |
OLD | NEW |