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

Unified Diff: google_apis/gcm/gcm_client_impl_unittest.cc

Issue 261853012: Componentize GCM Part 1: create GCM component and move some files over (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove os_crypt dependency from google_apis/gcm Created 6 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: 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 451c2c40b10cf6e3de03aae64e9c71aad116017a..bd81b94ac1cf0d65fa429d2099952b2916c3ac6b 100644
--- a/google_apis/gcm/gcm_client_impl_unittest.cc
+++ b/google_apis/gcm/gcm_client_impl_unittest.cc
@@ -10,7 +10,7 @@
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/clock.h"
-#include "components/os_crypt/os_crypt_switches.h"
+#include "google_apis/gcm/base/fake_encryptor.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"
@@ -329,10 +329,6 @@ GCMClientImplTest::~GCMClientImplTest() {}
void GCMClientImplTest::SetUp() {
testing::Test::SetUp();
-#if defined(OS_MACOSX)
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- os_crypt::switches::kUseMockKeychain);
-#endif // OS_MACOSX
ASSERT_TRUE(CreateUniqueTempDir());
InitializeLoop();
BuildGCMClient(base::TimeDelta());
@@ -367,8 +363,10 @@ bool GCMClientImplTest::CreateUniqueTempDir() {
}
void GCMClientImplTest::BuildGCMClient(base::TimeDelta clock_step) {
- gcm_client_.reset(new GCMClientImpl(make_scoped_ptr<GCMInternalsBuilder>(
- new FakeGCMInternalsBuilder(clock_step))));
+ gcm_client_.reset(new GCMClientImpl(
+ make_scoped_ptr<GCMInternalsBuilder>(
+ new FakeGCMInternalsBuilder(clock_step)),
+ make_scoped_ptr<FakeEncryptor>(new FakeEncryptor)));
}
void GCMClientImplTest::CompleteCheckin(
@@ -701,10 +699,6 @@ GCMClientImplCheckinTest::~GCMClientImplCheckinTest() {
void GCMClientImplCheckinTest::SetUp() {
testing::Test::SetUp();
-#if defined(OS_MACOSX)
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- os_crypt::switches::kUseMockKeychain);
-#endif // OS_MACOSX
// Creating unique temp directory that will be used by GCMStore shared between
// GCM Client and G-services settings.
ASSERT_TRUE(CreateUniqueTempDir());

Powered by Google App Engine
This is Rietveld 408576698