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

Side by Side Diff: components/filesystem/files_test_base.h

Issue 1231493002: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 5 years, 5 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
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 #ifndef COMPONENTS_FILESYSTEM_FILES_TEST_BASE_H_ 5 #ifndef COMPONENTS_FILESYSTEM_FILES_TEST_BASE_H_
6 #define COMPONENTS_FILESYSTEM_FILES_TEST_BASE_H_ 6 #define COMPONENTS_FILESYSTEM_FILES_TEST_BASE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/filesystem/public/interfaces/file_system.mojom.h" 9 #include "components/filesystem/public/interfaces/file_system.mojom.h"
10 #include "mojo/application/public/cpp/application_test_base.h" 10 #include "mojo/application/public/cpp/application_test_base.h"
11 11
12 namespace filesystem { 12 namespace filesystem {
13 13
14 class FilesTestBase : public mojo::test::ApplicationTestBase { 14 class FilesTestBase : public mojo::test::ApplicationTestBase,
15 public filesystem::FileSystemClient {
15 public: 16 public:
16 FilesTestBase(); 17 FilesTestBase();
17 ~FilesTestBase() override; 18 ~FilesTestBase() override;
18 19
20 // Overridden from mojo::test::ApplicationTestBase:
19 void SetUp() override; 21 void SetUp() override;
20 22
23 // Overridden from FileSystemClient:
24 void OnFileSystemShutdown() override;
25
21 protected: 26 protected:
22 // Note: This has an out parameter rather than returning the |DirectoryPtr|, 27 // Note: This has an out parameter rather than returning the |DirectoryPtr|,
23 // since |ASSERT_...()| doesn't work with return values. 28 // since |ASSERT_...()| doesn't work with return values.
24 void GetTemporaryRoot(DirectoryPtr* directory); 29 void GetTemporaryRoot(DirectoryPtr* directory);
25 30
26 FileSystemPtr& files() { return files_; } 31 FileSystemPtr& files() { return files_; }
27 32
28 private: 33 private:
34 mojo::Binding<filesystem::FileSystemClient> binding_;
29 FileSystemPtr files_; 35 FileSystemPtr files_;
30 36
31 DISALLOW_COPY_AND_ASSIGN(FilesTestBase); 37 DISALLOW_COPY_AND_ASSIGN(FilesTestBase);
32 }; 38 };
33 39
34 } // namespace filesystem 40 } // namespace filesystem
35 41
36 #endif // COMPONENTS_FILESYSTEM_FILES_TEST_BASE_H_ 42 #endif // COMPONENTS_FILESYSTEM_FILES_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698