OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/public/browser/push_messaging_service.h" | 5 #include "content/public/browser/push_messaging_service.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 16 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
17 #include "chrome/browser/permissions/permission_manager.h" | 17 #include "chrome/browser/permissions/permission_manager.h" |
18 #include "chrome/browser/permissions/permission_manager_factory.h" | 18 #include "chrome/browser/permissions/permission_manager_factory.h" |
19 #include "chrome/browser/push_messaging/push_messaging_app_identifier.h" | 19 #include "chrome/browser/push_messaging/push_messaging_app_identifier.h" |
20 #include "chrome/browser/push_messaging/push_messaging_permission_context.h" | |
21 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" | 20 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" |
22 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" | 21 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
23 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" | 22 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" |
24 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 23 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
25 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
26 #include "components/content_settings/core/browser/host_content_settings_map.h" | 25 #include "components/content_settings/core/browser/host_content_settings_map.h" |
27 #include "components/gcm_driver/crypto/gcm_crypto_test_helpers.h" | 26 #include "components/gcm_driver/crypto/gcm_crypto_test_helpers.h" |
28 #include "components/gcm_driver/fake_gcm_client_factory.h" | 27 #include "components/gcm_driver/fake_gcm_client_factory.h" |
29 #include "components/gcm_driver/gcm_profile_service.h" | 28 #include "components/gcm_driver/gcm_profile_service.h" |
30 #include "content/public/common/push_event_payload.h" | 29 #include "content/public/common/push_event_payload.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 244 } |
246 | 245 |
247 TEST_F(PushMessagingServiceTest, DifferentEndpoints) { | 246 TEST_F(PushMessagingServiceTest, DifferentEndpoints) { |
248 PushMessagingServiceImpl* push_service = profile()->GetPushMessagingService(); | 247 PushMessagingServiceImpl* push_service = profile()->GetPushMessagingService(); |
249 ASSERT_TRUE(push_service); | 248 ASSERT_TRUE(push_service); |
250 | 249 |
251 // Verifies that the service returns different endpoints depending on whether | 250 // Verifies that the service returns different endpoints depending on whether |
252 // support for the standard protocol is requested. | 251 // support for the standard protocol is requested. |
253 EXPECT_NE(push_service->GetEndpoint(true), push_service->GetEndpoint(false)); | 252 EXPECT_NE(push_service->GetEndpoint(true), push_service->GetEndpoint(false)); |
254 } | 253 } |
OLD | NEW |