| 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_MEDIA_ROUTER_MOJO_TEST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_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/message_loop/message_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "chrome/browser/media/router/media_router_mojo_impl.h" | 13 #include "chrome/browser/media/router/media_router_mojo_impl.h" |
| 14 #include "chrome/browser/media/router/mock_media_router.h" | 14 #include "chrome/browser/media/router/mock_media_router.h" |
| 15 #include "chrome/browser/media/router/test_helper.h" | 15 #include "chrome/browser/media/router/test_helper.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 17 #include "content/public/test/test_browser_thread_bundle.h" |
| 17 #include "extensions/common/extension.h" | 18 #include "extensions/common/extension.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 19 #include "mojo/public/cpp/bindings/binding.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 22 |
| 22 namespace media_router { | 23 namespace media_router { |
| 23 | 24 |
| 24 class MediaRouterMojoImpl; | 25 class MediaRouterMojoImpl; |
| 25 class MessagePump; | 26 class MessagePump; |
| 26 | 27 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 43 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); } | 44 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); } |
| 44 | 45 |
| 45 // Mock objects. | 46 // Mock objects. |
| 46 MockMediaRouteProvider mock_media_route_provider_; | 47 MockMediaRouteProvider mock_media_route_provider_; |
| 47 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_; | 48 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_; |
| 48 | 49 |
| 49 // Mojo proxy object for |mock_media_router_| | 50 // Mojo proxy object for |mock_media_router_| |
| 50 media_router::interfaces::MediaRouterPtr media_router_proxy_; | 51 media_router::interfaces::MediaRouterPtr media_router_proxy_; |
| 51 | 52 |
| 52 private: | 53 private: |
| 54 content::TestBrowserThreadBundle test_thread_bundle_; |
| 53 scoped_refptr<extensions::Extension> extension_; | 55 scoped_refptr<extensions::Extension> extension_; |
| 54 scoped_ptr<MediaRouterMojoImpl> mock_media_router_; | 56 scoped_ptr<MediaRouterMojoImpl> mock_media_router_; |
| 55 scoped_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_; | 57 scoped_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_; |
| 56 base::MessageLoop message_loop_; | 58 scoped_ptr<base::RunLoop> run_loop_; |
| 57 | 59 |
| 58 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); | 60 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace media_router | 63 } // namespace media_router |
| 62 | 64 |
| 63 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_ | 65 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_ |
| OLD | NEW |