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

Side by Side Diff: trunk/src/chrome/browser/services/gcm/gcm_service_unittest.cc

Issue 281783004: Revert 270226 "Componentize GCM Part 1: create GCM component and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/services/gcm/gcm_service.h" 5 #include "chrome/browser/services/gcm/gcm_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "chrome/browser/services/gcm/fake_gcm_client_factory.h" 14 #include "chrome/browser/services/gcm/fake_gcm_client_factory.h"
15 #include "chrome/browser/services/gcm/gcm_app_handler.h"
16 #include "chrome/browser/services/gcm/gcm_client_factory.h"
15 #include "chrome/browser/services/gcm/gcm_client_mock.h" 17 #include "chrome/browser/services/gcm/gcm_client_mock.h"
16 #include "components/gcm_driver/gcm_app_handler.h"
17 #include "components/gcm_driver/gcm_client_factory.h"
18 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
19 #include "content/public/test/test_browser_thread_bundle.h" 19 #include "content/public/test/test_browser_thread_bundle.h"
20 #include "google_apis/gaia/fake_identity_provider.h" 20 #include "google_apis/gaia/fake_identity_provider.h"
21 #include "google_apis/gaia/fake_oauth2_token_service.h" 21 #include "google_apis/gaia/fake_oauth2_token_service.h"
22 #include "google_apis/gcm/base/fake_encryptor.h"
23 #include "net/url_request/url_request_context_getter.h" 22 #include "net/url_request/url_request_context_getter.h"
24 #include "net/url_request/url_request_test_util.h" 23 #include "net/url_request/url_request_test_util.h"
25 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
26 25
27 namespace gcm { 26 namespace gcm {
28 27
29 namespace { 28 namespace {
30 29
31 const char kTestAccountID1[] = "user1@example.com"; 30 const char kTestAccountID1[] = "user1@example.com";
32 const char kTestAccountID2[] = "user2@example.com"; 31 const char kTestAccountID2[] = "user2@example.com";
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 wrapper_->GetGCMClient()->ReceiveMessage(kTestAppID1, in_message5); 1312 wrapper_->GetGCMClient()->ReceiveMessage(kTestAppID1, in_message5);
1314 1313
1315 wrapper_->gcm_app_handler()->WaitForNotification(); 1314 wrapper_->gcm_app_handler()->WaitForNotification();
1316 1315
1317 EXPECT_EQ(FakeGCMAppHandler::MESSAGE_EVENT, 1316 EXPECT_EQ(FakeGCMAppHandler::MESSAGE_EVENT,
1318 wrapper_->gcm_app_handler()->received_event()); 1317 wrapper_->gcm_app_handler()->received_event());
1319 EXPECT_EQ(in_message5.data, wrapper_->gcm_app_handler()->message().data); 1318 EXPECT_EQ(in_message5.data, wrapper_->gcm_app_handler()->message().data);
1320 } 1319 }
1321 1320
1322 } // namespace gcm 1321 } // namespace gcm
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/services/gcm/gcm_service.cc ('k') | trunk/src/chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698