| 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/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "chrome/browser/extensions/api/gcm/gcm_api.h" | 6 #include "chrome/browser/extensions/api/gcm/gcm_api.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_gcm_app_handler.h" | 8 #include "chrome/browser/extensions/extension_gcm_app_handler.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" | 10 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" |
| 11 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 11 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
| 12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
| 14 #include "components/browser_sync/common/browser_sync_switches.h" | 14 #include "components/browser_sync/browser_sync_switches.h" |
| 15 #include "extensions/test/result_catcher.h" | 15 #include "extensions/test/result_catcher.h" |
| 16 | 16 |
| 17 using extensions::ResultCatcher; | 17 using extensions::ResultCatcher; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const char kEventsExtension[] = "gcm/events"; | 21 const char kEventsExtension[] = "gcm/events"; |
| 22 | 22 |
| 23 gcm::GCMClient::SendErrorDetails CreateErrorDetails( | 23 gcm::GCMClient::SendErrorDetails CreateErrorDetails( |
| 24 const std::string& message_id, | 24 const std::string& message_id, |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 incognito_catcher.RestrictToBrowserContext( | 259 incognito_catcher.RestrictToBrowserContext( |
| 260 profile()->GetOffTheRecordProfile()); | 260 profile()->GetOffTheRecordProfile()); |
| 261 | 261 |
| 262 ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito")); | 262 ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito")); |
| 263 | 263 |
| 264 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 264 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 265 EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message(); | 265 EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace extensions | 268 } // namespace extensions |
| OLD | NEW |