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

Unified Diff: chrome/browser/process_singleton_posix_unittest.cc

Issue 2871793003: Added histograms on process singleton create when remote process exists and we cannot notify it (Closed)
Patch Set: Some fixes basing on review comments Created 3 years, 7 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/process_singleton_posix_unittest.cc
diff --git a/chrome/browser/process_singleton_posix_unittest.cc b/chrome/browser/process_singleton_posix_unittest.cc
index 4c3922a030247d6d9f07d7a3089ecb010906a91d..e5217f29c63e193083ce73e06392fed6aa579bf4 100644
--- a/chrome/browser/process_singleton_posix_unittest.cc
+++ b/chrome/browser/process_singleton_posix_unittest.cc
@@ -27,6 +27,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
+#include "base/test/histogram_tester.h"
#include "base/test/test_timeouts.h"
#include "base/test/thread_test_helper.h"
#include "base/threading/thread.h"
@@ -286,12 +287,16 @@ TEST_F(ProcessSingletonPosixTest, NotifyOtherProcessSuccess) {
// Test failure case of NotifyOtherProcess().
TEST_F(ProcessSingletonPosixTest, NotifyOtherProcessFailure) {
+ base::HistogramTester histogram_tester;
CreateProcessSingletonOnThread();
BlockWorkerThread();
EXPECT_EQ(ProcessSingleton::PROCESS_NONE, NotifyOtherProcess(true));
ASSERT_EQ(1, kill_callbacks_);
UnblockWorkerThread();
+ histogram_tester.ExpectUniqueSample(
+ "Chrome.ProcessSingleton.RemoteHungProcessTerminateReason",
+ ProcessSingleton::SOCKET_READ_FAILED, 1u);
}
// Test that we don't kill ourselves by accident if a lockfile with the same pid

Powered by Google App Engine
This is Rietveld 408576698