| 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" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 } // namespace | 55 } // namespace |
| 56 | 56 |
| 57 namespace extensions { | 57 namespace extensions { |
| 58 | 58 |
| 59 class GcmApiTest : public ExtensionApiTest { | 59 class GcmApiTest : public ExtensionApiTest { |
| 60 public: | 60 public: |
| 61 GcmApiTest() : fake_gcm_profile_service_(NULL) {} | 61 GcmApiTest() : fake_gcm_profile_service_(NULL) {} |
| 62 | 62 |
| 63 protected: | 63 protected: |
| 64 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 64 virtual void SetUpCommandLine(CommandLine* command_line) override; |
| 65 virtual void SetUpOnMainThread() OVERRIDE; | 65 virtual void SetUpOnMainThread() override; |
| 66 | 66 |
| 67 void StartCollecting(); | 67 void StartCollecting(); |
| 68 | 68 |
| 69 const Extension* LoadTestExtension(const std::string& extension_path, | 69 const Extension* LoadTestExtension(const std::string& extension_path, |
| 70 const std::string& page_name); | 70 const std::string& page_name); |
| 71 gcm::FakeGCMProfileService* service() const; | 71 gcm::FakeGCMProfileService* service() const; |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 gcm::FakeGCMProfileService* fake_gcm_profile_service_; | 74 gcm::FakeGCMProfileService* fake_gcm_profile_service_; |
| 75 }; | 75 }; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 incognito_catcher.RestrictToBrowserContext( | 256 incognito_catcher.RestrictToBrowserContext( |
| 257 profile()->GetOffTheRecordProfile()); | 257 profile()->GetOffTheRecordProfile()); |
| 258 | 258 |
| 259 ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito")); | 259 ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito")); |
| 260 | 260 |
| 261 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 261 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 262 EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message(); | 262 EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace extensions | 265 } // namespace extensions |
| OLD | NEW |