| 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/location.h" | 5 #include "base/location.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 class MockPresentationServiceClient : | 133 class MockPresentationServiceClient : |
| 134 public presentation::PresentationServiceClient { | 134 public presentation::PresentationServiceClient { |
| 135 public: | 135 public: |
| 136 MOCK_METHOD1(OnScreenAvailabilityUpdated, void(bool available)); | 136 MOCK_METHOD1(OnScreenAvailabilityUpdated, void(bool available)); |
| 137 void OnSessionStateChanged( | 137 void OnSessionStateChanged( |
| 138 presentation::PresentationSessionInfoPtr session_info, | 138 presentation::PresentationSessionInfoPtr session_info, |
| 139 presentation::PresentationSessionState new_state) override { | 139 presentation::PresentationSessionState new_state) override { |
| 140 NOTIMPLEMENTED(); | 140 NOTIMPLEMENTED(); |
| 141 } | 141 } |
| 142 void OnScreenAvailabilityNotSupported() override { |
| 143 NOTIMPLEMENTED(); |
| 144 } |
| 142 }; | 145 }; |
| 143 | 146 |
| 144 class PresentationServiceImplTest : public RenderViewHostImplTestHarness { | 147 class PresentationServiceImplTest : public RenderViewHostImplTestHarness { |
| 145 public: | 148 public: |
| 146 PresentationServiceImplTest() : default_session_started_count_(0) {} | 149 PresentationServiceImplTest() : default_session_started_count_(0) {} |
| 147 | 150 |
| 148 void SetUp() override { | 151 void SetUp() override { |
| 149 RenderViewHostImplTestHarness::SetUp(); | 152 RenderViewHostImplTestHarness::SetUp(); |
| 150 | 153 |
| 151 auto request = mojo::GetProxy(&service_ptr_); | 154 auto request = mojo::GetProxy(&service_ptr_); |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 service_ptr_->JoinSession( | 835 service_ptr_->JoinSession( |
| 833 base::StringPrintf(presentation_url, i), | 836 base::StringPrintf(presentation_url, i), |
| 834 base::StringPrintf(presentation_id, i), | 837 base::StringPrintf(presentation_id, i), |
| 835 base::Bind( | 838 base::Bind( |
| 836 &PresentationServiceImplTest::ExpectNewSessionMojoCallbackError, | 839 &PresentationServiceImplTest::ExpectNewSessionMojoCallbackError, |
| 837 base::Unretained(this))); | 840 base::Unretained(this))); |
| 838 SaveQuitClosureAndRunLoop(); | 841 SaveQuitClosureAndRunLoop(); |
| 839 } | 842 } |
| 840 | 843 |
| 841 } // namespace content | 844 } // namespace content |
| OLD | NEW |