| 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 "files/c/tests/mojio_impl_test_base.h" | 5 #include "files/c/tests/mojio_impl_test_base.h" |
| 6 | 6 |
| 7 #include "files/interfaces/files.mojom-sync.h" | 7 #include "files/interfaces/files.mojom-sync.h" |
| 8 #include "files/interfaces/files.mojom.h" | 8 #include "files/interfaces/files.mojom.h" |
| 9 #include "mojo/public/cpp/application/application_impl.h" | |
| 10 #include "mojo/public/cpp/application/connect.h" | 9 #include "mojo/public/cpp/application/connect.h" |
| 11 #include "mojo/public/cpp/bindings/interface_request.h" | 10 #include "mojo/public/cpp/bindings/interface_request.h" |
| 12 #include "mojo/public/cpp/bindings/synchronous_interface_ptr.h" | 11 #include "mojo/public/cpp/bindings/synchronous_interface_ptr.h" |
| 13 #include "mojo/public/cpp/environment/logging.h" | 12 #include "mojo/public/cpp/environment/logging.h" |
| 14 | 13 |
| 15 using mojo::SynchronousInterfacePtr; | 14 using mojo::SynchronousInterfacePtr; |
| 16 | 15 |
| 17 namespace mojio { | 16 namespace mojio { |
| 18 namespace test { | 17 namespace test { |
| 19 | 18 |
| 20 MojioImplTestBase::MojioImplTestBase() { | 19 MojioImplTestBase::MojioImplTestBase() { |
| 21 } | 20 } |
| 22 | 21 |
| 23 MojioImplTestBase::~MojioImplTestBase() { | 22 MojioImplTestBase::~MojioImplTestBase() { |
| 24 } | 23 } |
| 25 | 24 |
| 26 void MojioImplTestBase::SetUp() { | 25 void MojioImplTestBase::SetUp() { |
| 27 mojo::test::ApplicationTestBase::SetUp(); | 26 mojo::test::ApplicationTestBase::SetUp(); |
| 28 | 27 |
| 29 SynchronousInterfacePtr<mojo::files::Files> files; | 28 SynchronousInterfacePtr<mojo::files::Files> files; |
| 30 mojo::ConnectToService(application_impl()->shell(), "mojo:files", | 29 mojo::ConnectToService(shell(), "mojo:files", GetSynchronousProxy(&files)); |
| 31 GetSynchronousProxy(&files)); | |
| 32 | 30 |
| 33 mojo::files::Error error = mojo::files::Error::INTERNAL; | 31 mojo::files::Error error = mojo::files::Error::INTERNAL; |
| 34 MOJO_CHECK( | 32 MOJO_CHECK( |
| 35 files->OpenFileSystem(nullptr, mojo::GetProxy(&directory_), &error)); | 33 files->OpenFileSystem(nullptr, mojo::GetProxy(&directory_), &error)); |
| 36 MOJO_CHECK(error == mojo::files::Error::OK); | 34 MOJO_CHECK(error == mojo::files::Error::OK); |
| 37 } | 35 } |
| 38 | 36 |
| 39 } // namespace test | 37 } // namespace test |
| 40 } // namespace mojio | 38 } // namespace mojio |
| OLD | NEW |