blob: e71c778424983133ba0d826c458bf83a8cbf0f9a [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 "services/files/c/tests/mojio_impl_test_base.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/environment/logging.h"
#include "mojo/services/files/public/interfaces/files.mojom.h"
#include "services/files/c/lib/template_util.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(mojo::files::FILE_SYSTEM_TEMPORARY,
mojo::GetProxy(&directory_), Capture(&error));
MOJO_CHECK(files.WaitForIncomingMethodCall());
MOJO_CHECK(error == mojo::files::ERROR_OK);
}
} // namespace test
} // namespace mojio