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> |
| 8 |
7 #include <string> | 9 #include <string> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/macros.h" |
11 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
12 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
13 #include "chrome/browser/permissions/permission_manager.h" | 16 #include "chrome/browser/permissions/permission_manager.h" |
14 #include "chrome/browser/permissions/permission_manager_factory.h" | 17 #include "chrome/browser/permissions/permission_manager_factory.h" |
15 #include "chrome/browser/push_messaging/push_messaging_app_identifier.h" | 18 #include "chrome/browser/push_messaging/push_messaging_app_identifier.h" |
16 #include "chrome/browser/push_messaging/push_messaging_permission_context.h" | 19 #include "chrome/browser/push_messaging/push_messaging_permission_context.h" |
17 #include "chrome/browser/push_messaging/push_messaging_permission_context_factor
y.h" | 20 #include "chrome/browser/push_messaging/push_messaging_permission_context_factor
y.h" |
18 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" | 21 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" |
19 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" | 22 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
20 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" | 23 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 215 |
213 // (6) Verify that the message, as received by the Push Messaging Service, has | 216 // (6) Verify that the message, as received by the Push Messaging Service, has |
214 // indeed been decrypted by the GCM Driver, and has been forwarded to the | 217 // indeed been decrypted by the GCM Driver, and has been forwarded to the |
215 // Service Worker that has been associated with the subscription. | 218 // Service Worker that has been associated with the subscription. |
216 EXPECT_EQ(app_identifier.app_id(), app_id); | 219 EXPECT_EQ(app_identifier.app_id(), app_id); |
217 EXPECT_EQ(origin, dispatched_origin); | 220 EXPECT_EQ(origin, dispatched_origin); |
218 EXPECT_EQ(service_worker_registration_id, kTestServiceWorkerId); | 221 EXPECT_EQ(service_worker_registration_id, kTestServiceWorkerId); |
219 | 222 |
220 EXPECT_EQ(kTestPayload, message_data); | 223 EXPECT_EQ(kTestPayload, message_data); |
221 } | 224 } |
OLD | NEW |