| Index: components/filesystem/files_test_base.cc
|
| diff --git a/components/filesystem/files_test_base.cc b/components/filesystem/files_test_base.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f25f840ef80fea63693c827c825438077362b622
|
| --- /dev/null
|
| +++ b/components/filesystem/files_test_base.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/filesystem/files_test_base.h"
|
| +
|
| +#include "components/filesystem/public/interfaces/directory.mojom.h"
|
| +#include "components/filesystem/public/interfaces/types.mojom.h"
|
| +#include "mojo/application/public/cpp/application_impl.h"
|
| +
|
| +namespace mojo {
|
| +namespace files {
|
| +
|
| +FilesTestBase::FilesTestBase() {
|
| +}
|
| +
|
| +FilesTestBase::~FilesTestBase() {
|
| +}
|
| +
|
| +void FilesTestBase::SetUp() {
|
| + test::ApplicationTestBase::SetUp();
|
| + application_impl()->ConnectToService("mojo:files", &files_);
|
| +}
|
| +
|
| +void FilesTestBase::GetTemporaryRoot(DirectoryPtr* directory) {
|
| + Error error = ERROR_INTERNAL;
|
| + files()->OpenFileSystem(nullptr, GetProxy(directory), Capture(&error));
|
| + ASSERT_TRUE(files().WaitForIncomingMethodCall());
|
| + ASSERT_EQ(ERROR_OK, error);
|
| +}
|
| +
|
| +} // namespace files
|
| +} // namespace mojo
|
|
|