| 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/test/mock_callback.h" |
| 12 #include "chrome/browser/media/router/mock_media_router.h" | 13 #include "chrome/browser/media/router/mock_media_router.h" |
| 13 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" | 14 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" |
| 14 #include "chrome/browser/media/router/test_helper.h" | 15 #include "chrome/browser/media/router/test_helper.h" |
| 15 #include "chrome/common/media_router/mojo/media_router.mojom.h" | 16 #include "chrome/common/media_router/mojo/media_router.mojom.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
| 17 #include "content/public/test/test_browser_thread_bundle.h" | 18 #include "content/public/test/test_browser_thread_bundle.h" |
| 18 #include "extensions/browser/event_page_tracker.h" | 19 #include "extensions/browser/event_page_tracker.h" |
| 19 #include "extensions/common/extension.h" | 20 #include "extensions/common/extension.h" |
| 20 #include "mojo/public/cpp/bindings/binding.h" | 21 #include "mojo/public/cpp/bindings/binding.h" |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 177 |
| 177 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); } | 178 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); } |
| 178 | 179 |
| 179 // Mock objects. | 180 // Mock objects. |
| 180 MockMediaRouteProvider mock_media_route_provider_; | 181 MockMediaRouteProvider mock_media_route_provider_; |
| 181 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_; | 182 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_; |
| 182 | 183 |
| 183 // Mojo proxy object for |mock_media_router_| | 184 // Mojo proxy object for |mock_media_router_| |
| 184 media_router::mojom::MediaRouterPtr media_router_proxy_; | 185 media_router::mojom::MediaRouterPtr media_router_proxy_; |
| 185 | 186 |
| 187 base::MockCallback<mojom::MediaRouter::RegisterMediaRouteProviderCallback> |
| 188 mock_register_callback_; |
| 189 |
| 186 private: | 190 private: |
| 187 content::TestBrowserThreadBundle test_thread_bundle_; | 191 content::TestBrowserThreadBundle test_thread_bundle_; |
| 188 scoped_refptr<extensions::Extension> extension_; | 192 scoped_refptr<extensions::Extension> extension_; |
| 193 std::unique_ptr<TestingProfile> profile_; |
| 189 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; | 194 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; |
| 190 std::unique_ptr<mojo::Binding<mojom::MediaRouteProvider>> binding_; | 195 std::unique_ptr<mojo::Binding<mojom::MediaRouteProvider>> binding_; |
| 191 | 196 |
| 192 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); | 197 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); |
| 193 }; | 198 }; |
| 194 | 199 |
| 195 } // namespace media_router | 200 } // namespace media_router |
| 196 | 201 |
| 197 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 202 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| OLD | NEW |