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 #include "chrome/browser/media/router/presentation_media_sinks_observer.h" | 5 #include "chrome/browser/media/router/presentation_media_sinks_observer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "chrome/browser/media/router/media_source_helper.h" | |
11 #include "chrome/browser/media/router/mock_media_router.h" | 10 #include "chrome/browser/media/router/mock_media_router.h" |
12 #include "chrome/browser/media/router/mock_screen_availability_listener.h" | 11 #include "chrome/browser/media/router/mock_screen_availability_listener.h" |
| 12 #include "chrome/common/media_router/media_source_helper.h" |
13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
14 #include "content/public/browser/presentation_screen_availability_listener.h" | 14 #include "content/public/browser/presentation_screen_availability_listener.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 | 16 |
17 using testing::_; | 17 using testing::_; |
18 using testing::Mock; | 18 using testing::Mock; |
19 using testing::Return; | 19 using testing::Return; |
20 | 20 |
21 namespace media_router { | 21 namespace media_router { |
22 | 22 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 observer_->OnSinksReceived(result); | 87 observer_->OnSinksReceived(result); |
88 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); | 88 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); |
89 | 89 |
90 // |listener_| should get result since it changed to false. | 90 // |listener_| should get result since it changed to false. |
91 EXPECT_CALL(listener_, OnScreenAvailabilityChanged(false)).Times(1); | 91 EXPECT_CALL(listener_, OnScreenAvailabilityChanged(false)).Times(1); |
92 observer_->OnSinksReceived(std::vector<MediaSink>()); | 92 observer_->OnSinksReceived(std::vector<MediaSink>()); |
93 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); | 93 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); |
94 } | 94 } |
95 | 95 |
96 } // namespace media_router | 96 } // namespace media_router |
OLD | NEW |