OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/push_messaging/push_messaging_api.h" | 5 #include "chrome/browser/extensions/api/push_messaging/push_messaging_api.h" |
6 | 6 |
7 #include "apps/launcher.h" | 7 #include "apps/launcher.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler.h" | 9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler.h" |
10 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_mapper.h" | 10 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_mapper.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 MockInvalidationMapper::~MockInvalidationMapper() {} | 66 MockInvalidationMapper::~MockInvalidationMapper() {} |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 class PushMessagingApiTest : public ExtensionApiTest { | 70 class PushMessagingApiTest : public ExtensionApiTest { |
71 public: | 71 public: |
72 PushMessagingApiTest() | 72 PushMessagingApiTest() |
73 : fake_invalidation_service_(NULL) { | 73 : fake_invalidation_service_(NULL) { |
74 } | 74 } |
75 | 75 |
76 void SetUpCommandLine(CommandLine* command_line) override { | 76 void SetUpCommandLine(base::CommandLine* command_line) override { |
77 ExtensionApiTest::SetUpCommandLine(command_line); | 77 ExtensionApiTest::SetUpCommandLine(command_line); |
78 } | 78 } |
79 | 79 |
80 void SetUp() override { | 80 void SetUp() override { |
81 invalidation::ProfileInvalidationProviderFactory::GetInstance()-> | 81 invalidation::ProfileInvalidationProviderFactory::GetInstance()-> |
82 RegisterTestingFactory(BuildFakeProfileInvalidationProvider); | 82 RegisterTestingFactory(BuildFakeProfileInvalidationProvider); |
83 ExtensionApiTest::SetUp(); | 83 ExtensionApiTest::SetUp(); |
84 } | 84 } |
85 | 85 |
86 void SetUpOnMainThread() override { | 86 void SetUpOnMainThread() override { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 const extensions::Extension* extension = | 201 const extensions::Extension* extension = |
202 LoadExtension(test_data_dir_.AppendASCII("push_messaging")); | 202 LoadExtension(test_data_dir_.AppendASCII("push_messaging")); |
203 ASSERT_TRUE(extension); | 203 ASSERT_TRUE(extension); |
204 ui_test_utils::NavigateToURL( | 204 ui_test_utils::NavigateToURL( |
205 browser(), extension->GetResourceURL("get_channel_id.html")); | 205 browser(), extension->GetResourceURL("get_channel_id.html")); |
206 | 206 |
207 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 207 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
208 } | 208 } |
209 | 209 |
210 } // namespace extensions | 210 } // namespace extensions |
OLD | NEW |