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

Unified Diff: chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc

Issue 2064313004: Add support for obtaining AV products on Win7. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WSC is not available on Server products. Created 4 years, 6 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
« no previous file with comments | « chrome/browser/metrics/antivirus_metrics_provider_win.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
index 29c8da2835505239b4de8d57f817be5cca6abfc8..8d49f83f14e341b986c8179e0268987bcb49f558 100644
--- a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
+++ b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/test/histogram_tester.h"
#include "base/threading/thread_checker.h"
#include "base/threading/thread_restrictions.h"
#include "base/version.h"
@@ -109,6 +110,7 @@ class AntiVirusMetricsProviderTest : public ::testing::TestWithParam<bool> {
TEST_P(AntiVirusMetricsProviderTest, GetMetricsFullName) {
ASSERT_TRUE(thread_checker_.CalledOnValidThread());
+ base::HistogramTester histograms;
SetFullNamesFeatureEnabled(expect_unhashed_value_);
// Make sure the I/O is happening on the FILE thread by disallowing it on
// the main thread.
@@ -119,6 +121,14 @@ TEST_P(AntiVirusMetricsProviderTest, GetMetricsFullName) {
content::RunThisRunLoop(&run_loop_);
EXPECT_TRUE(got_results_);
base::ThreadRestrictions::SetIOAllowed(previous_value);
+
+ AntiVirusMetricsProvider::ResultCode expected_result =
+ AntiVirusMetricsProvider::RESULT_SUCCESS;
+ if (base::win::OSInfo::GetInstance()->version_type() ==
+ base::win::SUITE_SERVER)
+ expected_result = AntiVirusMetricsProvider::RESULT_WSC_NOT_AVAILABLE;
+ histograms.ExpectUniqueSample("UMA.AntiVirusMetricsProvider.Result",
+ expected_result, 1);
}
INSTANTIATE_TEST_CASE_P(, AntiVirusMetricsProviderTest, ::testing::Bool());
« no previous file with comments | « chrome/browser/metrics/antivirus_metrics_provider_win.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698