| 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 "base/macros.h" |
| 5 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 7 #include "chrome/browser/media/router/media_source_helper.h" | 8 #include "chrome/browser/media/router/media_source_helper.h" |
| 8 #include "chrome/browser/media/router/mock_media_router.h" | 9 #include "chrome/browser/media/router/mock_media_router.h" |
| 9 #include "chrome/browser/media/router/mock_screen_availability_listener.h" | 10 #include "chrome/browser/media/router/mock_screen_availability_listener.h" |
| 10 #include "chrome/browser/media/router/presentation_media_sinks_observer.h" | 11 #include "chrome/browser/media/router/presentation_media_sinks_observer.h" |
| 11 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 12 #include "content/public/browser/presentation_screen_availability_listener.h" | 13 #include "content/public/browser/presentation_screen_availability_listener.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 14 | 15 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 observer_->OnSinksReceived(result); | 81 observer_->OnSinksReceived(result); |
| 81 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); | 82 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); |
| 82 | 83 |
| 83 // |listener_| should get result since it changed to false. | 84 // |listener_| should get result since it changed to false. |
| 84 EXPECT_CALL(listener_, OnScreenAvailabilityChanged(false)).Times(1); | 85 EXPECT_CALL(listener_, OnScreenAvailabilityChanged(false)).Times(1); |
| 85 observer_->OnSinksReceived(std::vector<MediaSink>()); | 86 observer_->OnSinksReceived(std::vector<MediaSink>()); |
| 86 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); | 87 EXPECT_TRUE(Mock::VerifyAndClearExpectations(&listener_)); |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace media_router | 90 } // namespace media_router |
| OLD | NEW |