blob: b56e4db01c77364176af0f76571c8a78e053f63d [file] [log] [blame]
// 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 "files/c/tests/mojio_impl_test_base.h"
#include "files/c/lib/template_util.h"
#include "files/interfaces/files.mojom.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/environment/logging.h"
namespace mojio {
namespace test {
MojioImplTestBase::MojioImplTestBase() {
}
MojioImplTestBase::~MojioImplTestBase() {
}
void MojioImplTestBase::SetUp() {
mojo::test::ApplicationTestBase::SetUp();
mojo::files::FilesPtr files;
application_impl()->ConnectToService("mojo:files", &files);
mojo::files::Error error = mojo::files::Error::INTERNAL;
files->OpenFileSystem(nullptr, mojo::GetProxy(&directory_), Capture(&error));
MOJO_CHECK(files.WaitForIncomingResponse());
MOJO_CHECK(error == mojo::files::Error::OK);
}
} // namespace test
} // namespace mojio