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

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: code review changes 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
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..6e07842bfcc80eca880402ae4d6537a6898ca26f 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,8 @@ TEST_P(AntiVirusMetricsProviderTest, GetMetricsFullName) {
content::RunThisRunLoop(&run_loop_);
EXPECT_TRUE(got_results_);
base::ThreadRestrictions::SetIOAllowed(previous_value);
+ histograms.ExpectUniqueSample("UMA.AntiVirusMetricsProvider.Result",
+ AntiVirusMetricsProvider::RESULT_SUCCESS, 1);
}
INSTANTIATE_TEST_CASE_P(, AntiVirusMetricsProviderTest, ::testing::Bool());

Powered by Google App Engine
This is Rietveld 408576698