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

Unified Diff: chrome_elf/blacklist/test/blacklist_test.cc

Issue 120963002: Use a Finch Experiment to control the Browser Blacklist (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chrome_elf/blacklist/test/blacklist_test.cc
diff --git a/chrome_elf/blacklist/test/blacklist_test.cc b/chrome_elf/blacklist/test/blacklist_test.cc
index dbb662f97114684b3bd2d2aa45d6156b41082bd5..3b8dd178f1ca938897d4b2c0d956f47acc386aa7 100644
--- a/chrome_elf/blacklist/test/blacklist_test.cc
+++ b/chrome_elf/blacklist/test/blacklist_test.cc
@@ -38,8 +38,8 @@ class BlacklistTest : public testing::Test {
// Force an import from blacklist_test_main_dll.
InitBlacklistTestDll();
- // Ensure that the beacon state starts off cleared.
- blacklist::ClearBeacon();
+ // Ensure that the beacon state starts off enabled.
+ blacklist::ResetBeacon();
}
virtual void TearDown() {
@@ -52,17 +52,18 @@ TEST_F(BlacklistTest, Beacon) {
registry_util::RegistryOverrideManager override_manager;
override_manager.OverrideRegistry(HKEY_CURRENT_USER, L"beacon_test");
- // First call should succeed as the beacon is newly created.
- EXPECT_TRUE(blacklist::CreateBeacon());
+ // First call should find the beacon and reset it.
+ EXPECT_TRUE(blacklist::ResetBeacon());
- // Second call should fail indicating the beacon already existed.
- EXPECT_FALSE(blacklist::CreateBeacon());
+ // First call should succeed as the beacon is enabled.
+ EXPECT_TRUE(blacklist::LeaveSetupBeacon());
- // First call should find the beacon and delete it.
- EXPECT_TRUE(blacklist::ClearBeacon());
+ // Second call should fail indicating the beacon wasn't set as enabled.
+ EXPECT_FALSE(blacklist::LeaveSetupBeacon());
- // Second call should fail to find the beacon and delete it.
- EXPECT_FALSE(blacklist::ClearBeacon());
+ // Resetting the beacon should still work, even if the setup beacon
+ // is present.
+ EXPECT_TRUE(blacklist::ResetBeacon());
}
TEST_F(BlacklistTest, AddAndRemoveModules) {

Powered by Google App Engine
This is Rietveld 408576698