Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: services/files/files_test_base.cc

Issue 1990603002: Make ApplicationTestBase not use ApplicationImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: delete ApplicationImpl::WaitForInitialize() Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/contacts/contacts_apptest.cc ('k') | services/http_server/http_server_apptest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "services/files/files_test_base.h" 5 #include "services/files/files_test_base.h"
6 6
7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "mojo/public/cpp/application/connect.h" 7 #include "mojo/public/cpp/application/connect.h"
9 #include "mojo/services/files/interfaces/files.mojom.h" 8 #include "mojo/services/files/interfaces/files.mojom.h"
10 #include "mojo/services/files/interfaces/types.mojom.h" 9 #include "mojo/services/files/interfaces/types.mojom.h"
11 10
12 namespace mojo { 11 namespace mojo {
13 namespace files { 12 namespace files {
14 13
15 FilesTestBase::FilesTestBase() {} 14 FilesTestBase::FilesTestBase() {}
16 15
17 FilesTestBase::~FilesTestBase() {} 16 FilesTestBase::~FilesTestBase() {}
18 17
19 void FilesTestBase::SetUp() { 18 void FilesTestBase::SetUp() {
20 test::ApplicationTestBase::SetUp(); 19 test::ApplicationTestBase::SetUp();
21 ConnectToService(application_impl()->shell(), "mojo:files", 20 ConnectToService(shell(), "mojo:files", GetSynchronousProxy(&files_));
22 GetSynchronousProxy(&files_));
23 } 21 }
24 22
25 void FilesTestBase::GetTemporaryRoot( 23 void FilesTestBase::GetTemporaryRoot(
26 SynchronousInterfacePtr<Directory>* directory) { 24 SynchronousInterfacePtr<Directory>* directory) {
27 Error error = Error::INTERNAL; 25 Error error = Error::INTERNAL;
28 ASSERT_TRUE( 26 ASSERT_TRUE(
29 files_->OpenFileSystem(nullptr, GetSynchronousProxy(directory), &error)); 27 files_->OpenFileSystem(nullptr, GetSynchronousProxy(directory), &error));
30 ASSERT_EQ(Error::OK, error); 28 ASSERT_EQ(Error::OK, error);
31 } 29 }
32 30
33 void FilesTestBase::GetAppPersistentCacheRoot( 31 void FilesTestBase::GetAppPersistentCacheRoot(
34 SynchronousInterfacePtr<Directory>* directory) { 32 SynchronousInterfacePtr<Directory>* directory) {
35 Error error = Error::INTERNAL; 33 Error error = Error::INTERNAL;
36 ASSERT_TRUE(files_->OpenFileSystem("app_persistent_cache", 34 ASSERT_TRUE(files_->OpenFileSystem("app_persistent_cache",
37 GetSynchronousProxy(directory), &error)); 35 GetSynchronousProxy(directory), &error));
38 ASSERT_EQ(Error::OK, error); 36 ASSERT_EQ(Error::OK, error);
39 } 37 }
40 38
41 } // namespace files 39 } // namespace files
42 } // namespace mojo 40 } // namespace mojo
OLDNEW
« no previous file with comments | « services/contacts/contacts_apptest.cc ('k') | services/http_server/http_server_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698