| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 public: | 66 public: |
| 67 MediaServiceTest() | 67 MediaServiceTest() |
| 68 : ServiceTest("exe:media_mojo_unittests"), | 68 : ServiceTest("exe:media_mojo_unittests"), |
| 69 renderer_client_binding_(&renderer_client_), | 69 renderer_client_binding_(&renderer_client_), |
| 70 video_stream_(DemuxerStream::VIDEO) {} | 70 video_stream_(DemuxerStream::VIDEO) {} |
| 71 ~MediaServiceTest() override {} | 71 ~MediaServiceTest() override {} |
| 72 | 72 |
| 73 void SetUp() override { | 73 void SetUp() override { |
| 74 ServiceTest::SetUp(); | 74 ServiceTest::SetUp(); |
| 75 | 75 |
| 76 connection_ = connector()->Connect("mojo:media"); | 76 connection_ = connector()->Connect("service:media"); |
| 77 connection_->SetConnectionLostClosure(base::Bind( | 77 connection_->SetConnectionLostClosure(base::Bind( |
| 78 &MediaServiceTest::ConnectionClosed, base::Unretained(this))); | 78 &MediaServiceTest::ConnectionClosed, base::Unretained(this))); |
| 79 | 79 |
| 80 connection_->GetInterface(&service_factory_); | 80 connection_->GetInterface(&service_factory_); |
| 81 | 81 |
| 82 run_loop_.reset(new base::RunLoop()); | 82 run_loop_.reset(new base::RunLoop()); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // MOCK_METHOD* doesn't support move only types. Work around this by having | 85 // MOCK_METHOD* doesn't support move only types. Work around this by having |
| 86 // an extra method. | 86 // an extra method. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // close the connection. | 196 // close the connection. |
| 197 EXPECT_CALL(*this, ConnectionClosed()) | 197 EXPECT_CALL(*this, ConnectionClosed()) |
| 198 .Times(Exactly(1)) | 198 .Times(Exactly(1)) |
| 199 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); | 199 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); |
| 200 service_factory_.reset(); | 200 service_factory_.reset(); |
| 201 | 201 |
| 202 run_loop_->Run(); | 202 run_loop_->Run(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace media | 205 } // namespace media |
| OLD | NEW |