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 |