OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "chrome/browser/extensions/api/gcm/gcm_api.h" | 7 #include "chrome/browser/extensions/api/gcm/gcm_api.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_gcm_app_handler.h" | 9 #include "chrome/browser/extensions/extension_gcm_app_handler.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" | 11 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" |
| 12 #include "chrome/browser/services/gcm/gcm_client_factory.h" |
12 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 13 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
13 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
15 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
16 #include "components/gcm_driver/gcm_client_factory.h" | |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char kEventsExtension[] = "gcm/events"; | 20 const char kEventsExtension[] = "gcm/events"; |
21 | 21 |
22 gcm::GCMClient::SendErrorDetails CreateErrorDetails( | 22 gcm::GCMClient::SendErrorDetails CreateErrorDetails( |
23 const std::string& message_id, | 23 const std::string& message_id, |
24 const gcm::GCMClient::Result result, | 24 const gcm::GCMClient::Result result, |
25 const std::string& total_messages) { | 25 const std::string& total_messages) { |
26 gcm::GCMClient::SendErrorDetails error; | 26 gcm::GCMClient::SendErrorDetails error; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 ResultCatcher incognito_catcher; | 253 ResultCatcher incognito_catcher; |
254 incognito_catcher.RestrictToProfile(profile()->GetOffTheRecordProfile()); | 254 incognito_catcher.RestrictToProfile(profile()->GetOffTheRecordProfile()); |
255 | 255 |
256 ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito")); | 256 ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito")); |
257 | 257 |
258 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 258 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
259 EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message(); | 259 EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message(); |
260 } | 260 } |
261 | 261 |
262 } // namespace extensions | 262 } // namespace extensions |
OLD | NEW |