chrome/browser/chrome_elf_init_unittest_win.cc
TEST_F(ChromeBlacklistTrialTest, BlacklistDisabledRun) {
  // Set the beacons to enabled values.
  blacklist_registry_key_->WriteValue(blacklist::kBeaconState,
                                      blacklist::BLACKLIST_ENABLED);
  blacklist_registry_key_->WriteValue(blacklist::kBeaconVersion, L"Data");

  // Create the field trial with the blacklist disabled group.
  base::FieldTrialList field_trial_list(
    new metrics::SHA1EntropyProvider("test"));

  scoped_refptr<base::FieldTrial> trial(
    base::FieldTrialList::CreateFieldTrial(
      kBrowserBlacklistTrialName, kBrowserBlacklistTrialDisabledGroupName));

  // This setup code should now delete any existing blacklist beacons.
  InitializeChromeElf();

  // Ensure invalid values are returned to indicate that the beacon
  // values are indeed gone.
  ASSERT_EQ(blacklist::BLACKLIST_STATE_MAX, GetBlacklistState());
  ASSERT_EQ(base::string16(), GetBlacklistVersion());
}
// Ensure that the blacklist is disabled for any users in the
// "BlacklistDisabled" finch group.
Ensure that the blacklist is disabled for any users in the
"BlacklistDisabled" finch group.
Ensure that the blacklist is disabled for any users in the " BlacklistDisabled " finch group .
TEST_F(ChromeBlacklistTrialTest, BlacklistDisabledRun) {
  blacklist_registry_key_->WriteValue(blacklist::kBeaconState,
                                      blacklist::BLACKLIST_ENABLED);
  blacklist_registry_key_->WriteValue(blacklist::kBeaconVersion, L"Data");
  base::FieldTrialList field_trial_list(
    new metrics::SHA1EntropyProvider("test"));
  scoped_refptr<base::FieldTrial> trial(
    base::FieldTrialList::CreateFieldTrial(
      kBrowserBlacklistTrialName, kBrowserBlacklistTrialDisabledGroupName));
  InitializeChromeElf();
  ASSERT_EQ(blacklist::BLACKLIST_STATE_MAX, GetBlacklistState());
  ASSERT_EQ(base::string16(), GetBlacklistVersion());
}
TEST_F ( ChromeBlacklistTrialTest , BlacklistDisabledRun ) { blacklist_registry_key_ -> WriteValue ( blacklist :: kBeaconState , blacklist :: BLACKLIST_ENABLED ) ; blacklist_registry_key_ -> WriteValue ( blacklist :: kBeaconVersion , L" " ) ; base :: FieldTrialList field_trial_list ( new metrics :: SHA1EntropyProvider ( " " ) ) ; scoped_refptr < base :: FieldTrial > trial ( base :: FieldTrialList :: CreateFieldTrial ( kBrowserBlacklistTrialName , kBrowserBlacklistTrialDisabledGroupName ) ) ; InitializeChromeElf ( ) ; ASSERT_EQ ( blacklist :: BLACKLIST_STATE_MAX , GetBlacklistState ( ) ) ; ASSERT_EQ ( base :: string16 ( ) , GetBlacklistVersion ( ) ) ; }
Ensure that the blacklist is disabled for any users in the
"BlacklistDisabled" finch group.
Ensure that the blacklist is disabled for any users in the " BlacklistDisabled " finch group .
// Set the beacons to enabled values. // Create the field trial with the blacklist disabled group. // This setup code should now delete any existing blacklist beacons. // Ensure invalid values are returned to indicate that the beacon // values are indeed gone.