OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | |
9 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "testing/gtest/include/gtest/gtest-spi.h" | 13 #include "testing/gtest/include/gtest/gtest-spi.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
16 | 16 |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
19 #endif | 19 #endif |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 223 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
224 EXPECT_TRUE(PathService::Override(base::DIR_TEMP, temp_dir.path())); | 224 EXPECT_TRUE(PathService::Override(base::DIR_TEMP, temp_dir.path())); |
225 base::FilePath new_user_data_dir; | 225 base::FilePath new_user_data_dir; |
226 EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &new_user_data_dir)); | 226 EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &new_user_data_dir)); |
227 EXPECT_NE(original_user_data_dir, new_user_data_dir); | 227 EXPECT_NE(original_user_data_dir, new_user_data_dir); |
228 | 228 |
229 EXPECT_TRUE(PathService::RemoveOverride(base::DIR_TEMP)); | 229 EXPECT_TRUE(PathService::RemoveOverride(base::DIR_TEMP)); |
230 EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &new_user_data_dir)); | 230 EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &new_user_data_dir)); |
231 EXPECT_EQ(original_user_data_dir, new_user_data_dir); | 231 EXPECT_EQ(original_user_data_dir, new_user_data_dir); |
232 } | 232 } |
OLD | NEW |