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

Unified Diff: components/browser_watcher/watcher_metrics_provider_win_unittest.cc

Issue 2344343002: Wire in postmortem report collection (Closed)
Patch Set: Merge Created 4 years, 3 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 | « components/browser_watcher/watcher_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: components/browser_watcher/watcher_metrics_provider_win_unittest.cc
diff --git a/components/browser_watcher/watcher_metrics_provider_win_unittest.cc b/components/browser_watcher/watcher_metrics_provider_win_unittest.cc
index 456a48778e4e0470f3cd6a1ba4e0c431f47f1290..020b73855041152f9e7fa9af8b81a9f876c39ab3 100644
--- a/components/browser_watcher/watcher_metrics_provider_win_unittest.cc
+++ b/components/browser_watcher/watcher_metrics_provider_win_unittest.cc
@@ -87,7 +87,8 @@ TEST_F(WatcherMetricsProviderWinTest, RecordsStabilityHistogram) {
// Record a single failure.
AddProcessExitCode(false, 100);
- WatcherMetricsProviderWin provider(kRegistryPath, test_task_runner_.get());
+ WatcherMetricsProviderWin provider(kRegistryPath, base::FilePath(),
+ base::FilePath(), test_task_runner_.get());
provider.ProvideStabilityMetrics(NULL);
histogram_tester_.ExpectBucketCount(
@@ -109,7 +110,8 @@ TEST_F(WatcherMetricsProviderWinTest, DoesNotReportOwnProcessId) {
// Record own process as STILL_ACTIVE.
AddProcessExitCode(true, STILL_ACTIVE);
- WatcherMetricsProviderWin provider(kRegistryPath, test_task_runner_.get());
+ WatcherMetricsProviderWin provider(kRegistryPath, base::FilePath(),
+ base::FilePath(), test_task_runner_.get());
provider.ProvideStabilityMetrics(NULL);
histogram_tester_.ExpectUniqueSample(
@@ -129,7 +131,8 @@ TEST_F(WatcherMetricsProviderWinTest, DeletesRecordedExitFunnelEvents) {
base::win::RegistryKeyIterator it(HKEY_CURRENT_USER, kRegistryPath);
EXPECT_EQ(3u, it.SubkeyCount());
- WatcherMetricsProviderWin provider(kRegistryPath, test_task_runner_.get());
+ WatcherMetricsProviderWin provider(kRegistryPath, base::FilePath(),
+ base::FilePath(), test_task_runner_.get());
provider.ProvideStabilityMetrics(NULL);
// Make sure the exit funnel events are no longer recorded in histograms.
@@ -163,7 +166,8 @@ TEST_F(WatcherMetricsProviderWinTest, DeletesExitcodeKeyWhenNotReporting) {
AddExitFunnelEvent(102, L"Three", 990 * 1000);
// Make like the user is opted out of reporting.
- WatcherMetricsProviderWin provider(kRegistryPath, test_task_runner_.get());
+ WatcherMetricsProviderWin provider(kRegistryPath, base::FilePath(),
+ base::FilePath(), test_task_runner_.get());
provider.OnRecordingDisabled();
base::win::RegKey key;
@@ -194,7 +198,9 @@ TEST_F(WatcherMetricsProviderWinTest, DeletesOnly100FunnelsAtATime) {
{
// Make like the user is opted out of reporting.
- WatcherMetricsProviderWin provider(kRegistryPath, test_task_runner_.get());
+ WatcherMetricsProviderWin provider(kRegistryPath, base::FilePath(),
+ base::FilePath(),
+ test_task_runner_.get());
provider.OnRecordingDisabled();
// Flush the task(s).
test_task_runner_->RunPendingTasks();
« no previous file with comments | « components/browser_watcher/watcher_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