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

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: 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 a558589e2e5b8711d15c26d5a8c7fd4f91269ae0..d7913015b7e7b476746dc64b5d6d0a14492b342d 100644
--- a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
+++ b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
@@ -13,6 +13,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/test/histogram_tester.h"
#include "base/threading/thread_restrictions.h"
#include "base/version.h"
#include "base/win/windows_version.h"
@@ -103,6 +104,7 @@ class AntiVirusMetricsProviderTest : public ::testing::TestWithParam<bool> {
};
TEST_P(AntiVirusMetricsProviderTest, GetMetricsFullName) {
+ 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.
@@ -113,6 +115,8 @@ TEST_P(AntiVirusMetricsProviderTest, GetMetricsFullName) {
content::RunMessageLoop();
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