Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome_elf/chrome_elf_util.h" | 5 #include "chrome_elf/chrome_elf_util.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/test/test_reg_util_win.h" | 9 #include "base/test/test_reg_util_win.h" |
| 10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 EXPECT_TRUE(IsCanary(kCanaryExePath)); | 41 EXPECT_TRUE(IsCanary(kCanaryExePath)); |
| 42 EXPECT_FALSE(IsCanary(kChromeUserExePath)); | 42 EXPECT_FALSE(IsCanary(kChromeUserExePath)); |
| 43 EXPECT_FALSE(IsCanary(kChromiumExePath)); | 43 EXPECT_FALSE(IsCanary(kChromiumExePath)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 TEST(ChromeElfUtilTest, SystemInstallTest) { | 46 TEST(ChromeElfUtilTest, SystemInstallTest) { |
| 47 EXPECT_TRUE(IsSystemInstall(kChromeSystemExePath)); | 47 EXPECT_TRUE(IsSystemInstall(kChromeSystemExePath)); |
| 48 EXPECT_FALSE(IsSystemInstall(kChromeUserExePath)); | 48 EXPECT_FALSE(IsSystemInstall(kChromeUserExePath)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 TEST(ChromeElfUtilTest, BrowserProcessTest) { | |
| 52 EXPECT_TRUE(g_process_type == ProcessType::UNINITIALIZED); | |
|
grt (UTC plus 2)
2015/05/14 14:16:10
nit:
EXPECT_EQ(ProcessType::UNINITIALIZED, g_pro
Cait (Slow)
2015/05/14 14:50:16
Done.
| |
| 53 InitializeProcessType(); | |
| 54 EXPECT_FALSE(IsNonBrowserProcess()); | |
| 55 } | |
| 56 | |
| 51 // Parameterized test with paramters: | 57 // Parameterized test with paramters: |
| 52 // 1: product: "canary" or "google" | 58 // 1: product: "canary" or "google" |
| 53 // 2: install level: "user" or "system" | 59 // 2: install level: "user" or "system" |
| 54 // 3: install mode: "single" or "multi" | 60 // 3: install mode: "single" or "multi" |
| 55 class ChromeElfUtilTest : | 61 class ChromeElfUtilTest : |
| 56 public testing::TestWithParam<std::tuple<const char*, | 62 public testing::TestWithParam<std::tuple<const char*, |
| 57 const char*, | 63 const char*, |
| 58 const char*> > { | 64 const char*> > { |
| 59 protected: | 65 protected: |
| 60 void SetUp() override { | 66 void SetUp() override { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 INSTANTIATE_TEST_CASE_P(Canary, ChromeElfUtilTest, | 181 INSTANTIATE_TEST_CASE_P(Canary, ChromeElfUtilTest, |
| 176 testing::Combine(testing::Values("canary"), | 182 testing::Combine(testing::Values("canary"), |
| 177 testing::Values("user"), | 183 testing::Values("user"), |
| 178 testing::Values("single"))); | 184 testing::Values("single"))); |
| 179 INSTANTIATE_TEST_CASE_P(GoogleChrome, ChromeElfUtilTest, | 185 INSTANTIATE_TEST_CASE_P(GoogleChrome, ChromeElfUtilTest, |
| 180 testing::Combine(testing::Values("google"), | 186 testing::Combine(testing::Values("google"), |
| 181 testing::Values("user", "system"), | 187 testing::Values("user", "system"), |
| 182 testing::Values("single", "multi"))); | 188 testing::Values("single", "multi"))); |
| 183 | 189 |
| 184 } // namespace | 190 } // namespace |
| OLD | NEW |