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

Side by Side Diff: mojo/edk/test/scoped_test_dir.h

Issue 1354433003: Add a mojo::test::ScopedTestDir and convert tests to use it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 | « mojo/edk/test/BUILD.gn ('k') | mojo/edk/test/scoped_test_dir.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_TEST_SCOPED_TEST_DIR_H_
6 #define MOJO_EDK_TEST_SCOPED_TEST_DIR_H_
7
8 #include "base/files/scoped_temp_dir.h"
9 #include "mojo/edk/util/scoped_file.h"
10 #include "mojo/public/cpp/system/macros.h"
11
12 namespace mojo {
13 namespace test {
14
15 // Creates/destroyes a temporary directory for test purposes. (Unlike
16 // |base::ScopedTempDir|, this automatically creates the temporary directory.)
17 class ScopedTestDir {
18 public:
19 ScopedTestDir();
20 ~ScopedTestDir();
21
22 util::ScopedFILE CreateFile();
23
24 private:
25 base::ScopedTempDir temp_dir_;
26
27 MOJO_DISALLOW_COPY_AND_ASSIGN(ScopedTestDir);
28 };
29
30 } // namespace test
31 } // namespace mojo
32
33 #endif // MOJO_EDK_TEST_SCOPED_TEST_DIR_H_
OLDNEW
« no previous file with comments | « mojo/edk/test/BUILD.gn ('k') | mojo/edk/test/scoped_test_dir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698