1a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
2a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// found in the LICENSE file.
4a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
5a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "chrome_elf/chrome_elf_util.h"
6a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
7a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include <tuple>
8a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
9a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "base/test/test_reg_util_win.h"
10a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "base/win/registry.h"
11a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "testing/gtest/include/gtest/gtest.h"
12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "testing/platform_test.h"
13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
14a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)namespace {
15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kRegPathClientState[] = L"Software\\Google\\Update\\ClientState";
17a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kRegPathClientStateMedium[] =
18a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"Software\\Google\\Update\\ClientStateMedium";
19a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kRegValueUsageStats[] = L"usagestats";
20a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kUninstallArgumentsField[] = L"UninstallArguments";
21a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
22a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kAppGuidCanary[] =
23a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}";
24a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kAppGuidGoogleChrome[] =
25a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"{8A69D345-D564-463c-AFF1-A69D9E530F96}";
26a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kAppGuidGoogleBinaries[] =
27a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}";
28a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
29a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kCanaryExePath[] =
30a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"C:\\Users\\user\\AppData\\Local\\Google\\Chrome SxS\\Application"
31a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"\\chrome.exe";
32a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kChromeSystemExePath[] =
33a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
34a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kChromeUserExePath[] =
35a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"C:\\Users\\user\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe";
36a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const wchar_t kChromiumExePath[] =
37a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    L"C:\\Users\\user\\AppData\\Local\\Chromium\\Application\\chrome.exe";
38a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
39a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
40a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST(ChromeElfUtilTest, CanaryTest) {
41a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_TRUE(IsCanary(kCanaryExePath));
42a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(IsCanary(kChromeUserExePath));
43a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(IsCanary(kChromiumExePath));
44a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
45a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
46a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST(ChromeElfUtilTest, SystemInstallTest) {
47a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_TRUE(IsSystemInstall(kChromeSystemExePath));
48a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(IsSystemInstall(kChromeUserExePath));
49a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
50a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
51a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Parameterized test with paramters:
52a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// 1: product: "canary" or "google"
53a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// 2: install level: "user" or "system"
54a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// 3: install mode: "single" or "multi"
55a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)class ChromeElfUtilTest :
56a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    public testing::TestWithParam<std::tuple<const char*,
57a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                             const char*,
58a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                             const char*> > {
59a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) protected:
60a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  virtual void SetUp() OVERRIDE {
611320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci    override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE);
621320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci    override_manager_.OverrideRegistry(HKEY_CURRENT_USER);
63a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    const char* app;
64a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    const char* level;
65a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    const char* mode;
66a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    std::tie(app, level, mode) = GetParam();
67a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    is_canary_ = (std::string(app) == "canary");
68a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    system_level_ = (std::string(level) != "user");
69a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    multi_install_ = (std::string(mode) != "single");
70a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    if (is_canary_) {
71a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      ASSERT_FALSE(system_level_);
72a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      ASSERT_FALSE(multi_install_);
73a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      app_guid_ = kAppGuidCanary;
74a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      chrome_path_ = kCanaryExePath;
75a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    } else {
76a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      app_guid_ = kAppGuidGoogleChrome;
77a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      chrome_path_ = (system_level_ ? kChromeSystemExePath :
78a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                      kChromeUserExePath);
79a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    }
80a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    if (multi_install_) {
81a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      SetMultiInstallStateInRegistry(system_level_, true);
82a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      app_guid_ = kAppGuidGoogleBinaries;
83a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    }
84a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  }
85a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
86a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  base::string16 BuildKey(const wchar_t* path, const wchar_t* guid) {
87a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    base::string16 full_key_path(path);
88a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    full_key_path.append(1, L'\\');
89a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    full_key_path.append(guid);
90a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    return full_key_path;
91a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  }
92a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
93a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  void SetUsageStat(DWORD value, bool state_medium) {
94a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    LONG result = base::win::RegKey(
95a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        system_level_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER,
96a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        BuildKey(state_medium ? kRegPathClientStateMedium : kRegPathClientState,
97a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                 app_guid_).c_str(),
98a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        KEY_SET_VALUE).WriteValue(kRegValueUsageStats, value);
99a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    ASSERT_EQ(ERROR_SUCCESS, result);
100a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  }
101a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
102a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  void SetMultiInstallStateInRegistry(bool system_install, bool multi) {
103a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    base::win::RegKey key(
104a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER,
105a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        BuildKey(kRegPathClientState, kAppGuidGoogleChrome).c_str(),
106a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        KEY_SET_VALUE);
107a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    LONG result;
108a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    if (multi) {
109a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      result = key.WriteValue(kUninstallArgumentsField,
110a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                              L"yadda yadda --multi-install yadda yadda");
111a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    } else {
112a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)      result = key.DeleteValue(kUninstallArgumentsField);
113a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    }
114a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    ASSERT_EQ(ERROR_SUCCESS, result);
115a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  }
116a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
117a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  const wchar_t* app_guid_;
118a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  const wchar_t* chrome_path_;
119a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  bool system_level_;
120a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  bool multi_install_;
121a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  bool is_canary_;
122a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  registry_util::RegistryOverrideManager override_manager_;
123a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)};
124a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
125a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST_P(ChromeElfUtilTest, MultiInstallTest) {
126a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  if (is_canary_)
127a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    return;
128a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  SetMultiInstallStateInRegistry(system_level_, true);
129a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_TRUE(IsMultiInstall(system_level_));
130a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
131a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  SetMultiInstallStateInRegistry(system_level_, false);
132a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(IsMultiInstall(system_level_));
133a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
134a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
135a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST_P(ChromeElfUtilTest, UsageStatsAbsent) {
136a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(AreUsageStatsEnabled(chrome_path_));
137a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
138a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
139a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST_P(ChromeElfUtilTest, UsageStatsZero) {
140a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  SetUsageStat(0, false);
141a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(AreUsageStatsEnabled(chrome_path_));
142a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
143a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
144a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST_P(ChromeElfUtilTest, UsageStatsOne) {
145a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  SetUsageStat(1, false);
146a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_TRUE(AreUsageStatsEnabled(chrome_path_));
147a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  if (is_canary_) {
148a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    EXPECT_FALSE(AreUsageStatsEnabled(kChromeUserExePath));
149a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    EXPECT_FALSE(AreUsageStatsEnabled(kChromeSystemExePath));
150a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  } else if (system_level_) {
151a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    EXPECT_FALSE(AreUsageStatsEnabled(kCanaryExePath));
152a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    EXPECT_FALSE(AreUsageStatsEnabled(kChromeUserExePath));
153a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  } else {
154a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    EXPECT_FALSE(AreUsageStatsEnabled(kCanaryExePath));
155a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    EXPECT_FALSE(AreUsageStatsEnabled(kChromeSystemExePath));
156a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  }
157a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
158a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
159a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST_P(ChromeElfUtilTest, UsageStatsZeroInStateMedium) {
160a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  if (!system_level_)
161a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    return;
162a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  SetUsageStat(0, true);
163a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(AreUsageStatsEnabled(chrome_path_));
164a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
165a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
166a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)TEST_P(ChromeElfUtilTest, UsageStatsOneInStateMedium) {
167a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  if (!system_level_)
168a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    return;
169a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  SetUsageStat(1, true);
170a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_TRUE(AreUsageStatsEnabled(chrome_path_));
171a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(AreUsageStatsEnabled(kCanaryExePath));
172a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  EXPECT_FALSE(AreUsageStatsEnabled(kChromeUserExePath));
173a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
174a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
175a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)INSTANTIATE_TEST_CASE_P(Canary, ChromeElfUtilTest,
176a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                        testing::Combine(testing::Values("canary"),
177a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                         testing::Values("user"),
178a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                         testing::Values("single")));
179a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)INSTANTIATE_TEST_CASE_P(GoogleChrome, ChromeElfUtilTest,
180a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                        testing::Combine(testing::Values("google"),
181a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                         testing::Values("user", "system"),
182a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)                                         testing::Values("single", "multi")));
183a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
184a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}  // namespace
185