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

Unified Diff: chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc

Issue 278493002: Split GCMDriver into platform-specific implementations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybots 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: chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc
diff --git a/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc b/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc
index e6e97cc0249f36e55883ca0e695eea5fc239cc0d..848be3ed340424ef7a1da179ead788836095fe5d 100644
--- a/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc
+++ b/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/gcm_driver/fake_gcm_driver.h"
#include "components/gcm_driver/gcm_driver.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/gaia/fake_identity_provider.h"
@@ -19,11 +20,12 @@ namespace {
// Implementation of GCMDriver::Register that always succeeds with the same
// registrationId.
-class FakeGCMDriver : public gcm::GCMDriver {
+class CustomFakeGCMDriver : public gcm::FakeGCMDriver {
public:
- FakeGCMDriver() {}
- virtual ~FakeGCMDriver() {}
+ CustomFakeGCMDriver() {}
+ virtual ~CustomFakeGCMDriver() {}
+ // GCMDriver overrides:
virtual void Register(const std::string& app_id,
const std::vector<std::string>& sender_ids,
const RegisterCallback& callback) OVERRIDE {
@@ -34,7 +36,7 @@ class FakeGCMDriver : public gcm::GCMDriver {
}
private:
- DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver);
+ DISALLOW_COPY_AND_ASSIGN(CustomFakeGCMDriver);
};
class GCMInvalidationBridgeTest : public ::testing::Test {
@@ -53,7 +55,7 @@ class GCMInvalidationBridgeTest : public ::testing::Test {
(FakeProfileOAuth2TokenService*)
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get());
token_service->IssueRefreshTokenForUser("", "fake_refresh_token");
- gcm_driver_.reset(new FakeGCMDriver());
+ gcm_driver_.reset(new CustomFakeGCMDriver());
identity_provider_.reset(new FakeIdentityProvider(token_service));
bridge_.reset(new GCMInvalidationBridge(gcm_driver_.get(),

Powered by Google App Engine
This is Rietveld 408576698