Index: google_apis/gcm/gcm_client_impl_unittest.cc |
diff --git a/google_apis/gcm/gcm_client_impl_unittest.cc b/google_apis/gcm/gcm_client_impl_unittest.cc |
index 229feab49888790de8203e40bd22f7a01b41abb1..38ed9ed07ac897568dae792297edc9257fe82438 100644 |
--- a/google_apis/gcm/gcm_client_impl_unittest.cc |
+++ b/google_apis/gcm/gcm_client_impl_unittest.cc |
@@ -4,11 +4,11 @@ |
#include "google_apis/gcm/gcm_client_impl.h" |
+#include "base/command_line.h" |
#include "base/files/scoped_temp_dir.h" |
#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
#include "base/test/simple_test_clock.h" |
-#include "components/os_crypt/os_crypt.h" |
#include "google_apis/gcm/base/mcs_message.h" |
#include "google_apis/gcm/base/mcs_util.h" |
#include "google_apis/gcm/engine/fake_connection_factory.h" |
@@ -267,6 +267,7 @@ GCMClientImplTest::GCMClientImplTest() |
GCMClientImplTest::~GCMClientImplTest() {} |
void GCMClientImplTest::SetUp() { |
+ base::CommandLine::ForCurrentProcess()->AppendSwitch("use-mock-keychain"); |
jianli
2014/04/10 18:38:12
better call testing::Test::SetUp();.
|
ASSERT_TRUE(temp_directory_.CreateUniqueTempDir()); |
run_loop_.reset(new base::RunLoop); |
BuildGCMClient(); |
@@ -362,11 +363,6 @@ void GCMClientImplTest::InitializeGCMClient() { |
url_request_context_getter_, |
this); |
-#if defined(OS_MACOSX) |
- // On OSX, prevent the Keychain permissions popup during unit tests. |
- OSCrypt::UseMockKeychain(true); // Must be after Initialize. |
-#endif |
- |
// Start loading and check-in. |
gcm_client_->Load(); |