summaryrefslogtreecommitdiffstats
path: root/chrome/installer/gcapi
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-22 17:26:58 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-22 17:26:58 +0000
commitd5012affff82755b0772f3ff5c287e529c09bc35 (patch)
tree7225f90bc5f5b1874b1d70c93bd7a8b5693a5bfa /chrome/installer/gcapi
parentc3b92c09b243d92067d56e0aea56f7e4b48cdff7 (diff)
downloadchromium_src-d5012affff82755b0772f3ff5c287e529c09bc35.zip
chromium_src-d5012affff82755b0772f3ff5c287e529c09bc35.tar.gz
chromium_src-d5012affff82755b0772f3ff5c287e529c09bc35.tar.bz2
Fix GCAPIReactivationTest.ExperimentLabelCheck
This test was broken by http://crrev.com/175671; apply that CL's logic to the matching test as well. NOTRY=True BUG=277064 TEST=gcapi_test.exe pass again Review URL: https://chromiumcodereview.appspot.com/22911030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/gcapi')
-rw-r--r--chrome/installer/gcapi/gcapi_reactivation_test.cc35
1 files changed, 9 insertions, 26 deletions
diff --git a/chrome/installer/gcapi/gcapi_reactivation_test.cc b/chrome/installer/gcapi/gcapi_reactivation_test.cc
index cc552df..92987a2 100644
--- a/chrome/installer/gcapi/gcapi_reactivation_test.cc
+++ b/chrome/installer/gcapi/gcapi_reactivation_test.cc
@@ -22,17 +22,6 @@ using base::Time;
using base::TimeDelta;
using base::win::RegKey;
-namespace {
-
-const wchar_t kExperimentLabels[] = L"experiment_labels";
-
-const wchar_t* kExperimentAppGuids[] = {
- L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}",
- L"{8A69D345-D564-463C-AFF1-A69D9E530F96}",
-};
-
-}
-
class GCAPIReactivationTest : public ::testing::Test {
protected:
void SetUp() {
@@ -79,21 +68,15 @@ class GCAPIReactivationTest : public ::testing::Test {
}
bool HasExperimentLabels(HKEY hive) {
- int label_count = 0;
- for (int i = 0; i < arraysize(kExperimentAppGuids); ++i) {
- string16 client_state_path(google_update::kRegPathClientState);
- client_state_path += L"\\";
- client_state_path += kExperimentAppGuids[i];
-
- RegKey client_state_key(hive,
- client_state_path.c_str(),
- KEY_QUERY_VALUE);
- if (client_state_key.Valid() &&
- client_state_key.HasValue(kExperimentLabels)) {
- label_count++;
- }
- }
- return label_count == arraysize(kExperimentAppGuids);
+ string16 client_state_path(google_update::kRegPathClientState);
+ client_state_path.push_back(L'\\');
+ client_state_path.append(google_update::kChromeUpgradeCode);
+
+ RegKey client_state_key(hive,
+ client_state_path.c_str(),
+ KEY_QUERY_VALUE);
+ return client_state_key.Valid() &&
+ client_state_key.HasValue(google_update::kExperimentLabels);
}
std::wstring GetReactivationString(HKEY hive) {