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

Unified Diff: google_apis/gcm/gcm_client_impl_unittest.cc

Issue 221453003: Removing the mock-keychain related bool from GCMStore constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving all of the encryptor calls from tests to chrome binary Created 6 years, 8 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: 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..7c2710d2c10179f8694b7fc5d60d26294eafe0e5 100644
--- a/google_apis/gcm/gcm_client_impl_unittest.cc
+++ b/google_apis/gcm/gcm_client_impl_unittest.cc
@@ -8,11 +8,12 @@
#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"
#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 "google_apis/gcm/protocol/android_checkin.pb.h"
#include "google_apis/gcm/protocol/checkin.pb.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
@@ -290,8 +291,9 @@ void GCMClientImplTest::QuitLoop() {
}
void GCMClientImplTest::BuildGCMClient() {
- gcm_client_.reset(new GCMClientImpl(
- make_scoped_ptr<GCMInternalsBuilder>(new FakeGCMInternalsBuilder())));
+ scoped_ptr<GCMInternalsBuilder> builder(new FakeGCMInternalsBuilder());
+ builder->SetUpForTesting();
+ gcm_client_.reset(new GCMClientImpl(builder.Pass()));
}
void GCMClientImplTest::CompleteCheckin(uint64 android_id,
@@ -362,11 +364,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();

Powered by Google App Engine
This is Rietveld 408576698