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

Unified Diff: chrome_elf/chrome_elf_util_unittest.cc

Issue 1913943003: Remove dependencies on chrome\installer from the ChromeCrashReporterClient class on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit and revert some needless changes Created 4 years, 8 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/chrome_elf_util_unittest.cc
diff --git a/chrome_elf/chrome_elf_util_unittest.cc b/chrome_elf/chrome_elf_util_unittest.cc
index 26b3a26cdd1a62764ae11404df7edf71f17ce02e..c843bc8ebb61b8c48b10b5fe876ec11cd520bbe0 100644
--- a/chrome_elf/chrome_elf_util_unittest.cc
+++ b/chrome_elf/chrome_elf_util_unittest.cc
@@ -10,6 +10,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+using namespace install_static;
+
namespace {
const wchar_t kRegPathClientState[] = L"Software\\Google\\Update\\ClientState";
@@ -138,26 +140,26 @@ TEST_P(ChromeElfUtilTest, MultiInstallTest) {
}
TEST_P(ChromeElfUtilTest, UsageStatsAbsent) {
- EXPECT_FALSE(AreUsageStatsEnabled(chrome_path_));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(chrome_path_));
}
TEST_P(ChromeElfUtilTest, UsageStatsZero) {
SetUsageStat(0, false);
- EXPECT_FALSE(AreUsageStatsEnabled(chrome_path_));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(chrome_path_));
}
TEST_P(ChromeElfUtilTest, UsageStatsOne) {
SetUsageStat(1, false);
- EXPECT_TRUE(AreUsageStatsEnabled(chrome_path_));
+ EXPECT_TRUE(GetCollectStatsConsentForExe(chrome_path_));
if (is_canary_) {
- EXPECT_FALSE(AreUsageStatsEnabled(kChromeUserExePath));
- EXPECT_FALSE(AreUsageStatsEnabled(kChromeSystemExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kChromeUserExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kChromeSystemExePath));
} else if (system_level_) {
- EXPECT_FALSE(AreUsageStatsEnabled(kCanaryExePath));
- EXPECT_FALSE(AreUsageStatsEnabled(kChromeUserExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kCanaryExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kChromeUserExePath));
} else {
- EXPECT_FALSE(AreUsageStatsEnabled(kCanaryExePath));
- EXPECT_FALSE(AreUsageStatsEnabled(kChromeSystemExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kCanaryExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kChromeSystemExePath));
}
}
@@ -165,16 +167,16 @@ TEST_P(ChromeElfUtilTest, UsageStatsZeroInStateMedium) {
if (!system_level_)
return;
SetUsageStat(0, true);
- EXPECT_FALSE(AreUsageStatsEnabled(chrome_path_));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(chrome_path_));
}
TEST_P(ChromeElfUtilTest, UsageStatsOneInStateMedium) {
if (!system_level_)
return;
SetUsageStat(1, true);
- EXPECT_TRUE(AreUsageStatsEnabled(chrome_path_));
- EXPECT_FALSE(AreUsageStatsEnabled(kCanaryExePath));
- EXPECT_FALSE(AreUsageStatsEnabled(kChromeUserExePath));
+ EXPECT_TRUE(GetCollectStatsConsentForExe(chrome_path_));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kCanaryExePath));
+ EXPECT_FALSE(GetCollectStatsConsentForExe(kChromeUserExePath));
}
INSTANTIATE_TEST_CASE_P(Canary, ChromeElfUtilTest,

Powered by Google App Engine
This is Rietveld 408576698