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

Side by Side Diff: test/paths.cc

Issue 1051533002: test: Move util/test to its own top-level directory, test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Rebase Created 5 years, 8 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 Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include "util/test/paths.h" 15 #include "test/paths.h"
16 16
17 #include <stdlib.h> 17 #include <stdlib.h>
18 #include <sys/stat.h> 18 #include <sys/stat.h>
19 19
20 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 22
23 namespace crashpad { 23 namespace crashpad {
24 namespace test { 24 namespace test {
25 25
26 namespace { 26 namespace {
27 27
28 bool IsTestDataRoot(const base::FilePath& candidate) { 28 bool IsTestDataRoot(const base::FilePath& candidate) {
29 const base::FilePath marker_path = 29 const base::FilePath marker_path =
30 candidate.Append(FILE_PATH_LITERAL("util")) 30 candidate.Append(FILE_PATH_LITERAL("test"))
31 .Append(FILE_PATH_LITERAL("test"))
32 .Append(FILE_PATH_LITERAL("paths_test_data_root.txt")); 31 .Append(FILE_PATH_LITERAL("paths_test_data_root.txt"));
33 32
34 #if !defined(OS_WIN) 33 #if !defined(OS_WIN)
35 struct stat stat_buf; 34 struct stat stat_buf;
36 int rv = stat(marker_path.value().c_str(), &stat_buf); 35 int rv = stat(marker_path.value().c_str(), &stat_buf);
37 #else 36 #else
38 struct _stat stat_buf; 37 struct _stat stat_buf;
39 int rv = _wstat(marker_path.value().c_str(), &stat_buf); 38 int rv = _wstat(marker_path.value().c_str(), &stat_buf);
40 #endif 39 #endif
41 40
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 91
93 // static 92 // static
94 base::FilePath Paths::TestDataRoot() { 93 base::FilePath Paths::TestDataRoot() {
95 static base::FilePath* test_data_root = 94 static base::FilePath* test_data_root =
96 new base::FilePath(TestDataRootInternal()); 95 new base::FilePath(TestDataRootInternal());
97 return *test_data_root; 96 return *test_data_root;
98 } 97 }
99 98
100 } // namespace test 99 } // namespace test
101 } // namespace crashpad 100 } // namespace crashpad
OLDNEW
« no previous file with comments | « test/paths.h ('k') | test/paths_mac.cc » ('j') | util/util_test.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698