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