Index: google_apis/gcm/engine/mcs_client_unittest.cc |
diff --git a/google_apis/gcm/engine/mcs_client_unittest.cc b/google_apis/gcm/engine/mcs_client_unittest.cc |
index 5983ddd747ec41a82575874611151c1afb09df60..1b0d6add674610f2874899e1f91bf52cb5eb2a51 100644 |
--- a/google_apis/gcm/engine/mcs_client_unittest.cc |
+++ b/google_apis/gcm/engine/mcs_client_unittest.cc |
@@ -9,10 +9,10 @@ |
#include "base/run_loop.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/test/simple_test_clock.h" |
-#include "components/os_crypt/os_crypt.h" |
#include "google_apis/gcm/base/mcs_util.h" |
#include "google_apis/gcm/engine/fake_connection_factory.h" |
#include "google_apis/gcm/engine/fake_connection_handler.h" |
+#include "google_apis/gcm/engine/gcm_internals_builder.h" |
#include "google_apis/gcm/engine/gcm_store_impl.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -143,12 +143,6 @@ MCSClientTest::MCSClientTest() |
message_send_status_(MCSClient::SENT) { |
EXPECT_TRUE(temp_directory_.CreateUniqueTempDir()); |
run_loop_.reset(new base::RunLoop()); |
- |
- // On OSX, prevent the Keychain permissions popup during unit tests. |
-#if defined(OS_MACOSX) |
- OSCrypt::UseMockKeychain(true); |
-#endif |
- |
// Advance the clock to a non-zero time. |
clock_.Advance(base::TimeDelta::FromSeconds(1)); |
} |
@@ -156,9 +150,10 @@ MCSClientTest::MCSClientTest() |
MCSClientTest::~MCSClientTest() {} |
void MCSClientTest::BuildMCSClient() { |
- gcm_store_.reset(new GCMStoreImpl(true, |
- temp_directory_.path(), |
- message_loop_.message_loop_proxy())); |
+ GCMInternalsBuilder builder; |
+ builder.SetUpForTesting(); |
+ gcm_store_ = builder.BuildGCMStore(temp_directory_.path(), |
+ message_loop_.message_loop_proxy()); |
mcs_client_.reset(new TestMCSClient(&clock_, |
&connection_factory_, |
gcm_store_.get())); |