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

Side by Side Diff: chrome/common/chrome_paths_unittest.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « chrome/common/chrome_paths_mac.mm ('k') | chrome/common/chrome_switches.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 (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 "chrome/common/chrome_paths_internal.h" 5 #include "chrome/common/chrome_paths_internal.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "build/build_config.h"
13 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 // Test the behavior of chrome::GetUserCacheDirectory. 17 // Test the behavior of chrome::GetUserCacheDirectory.
17 // See that function's comments for discussion of the subtleties. 18 // See that function's comments for discussion of the subtleties.
18 TEST(ChromePaths, UserCacheDir) { 19 TEST(ChromePaths, UserCacheDir) {
19 base::FilePath test_profile_dir, cache_dir; 20 base::FilePath test_profile_dir, cache_dir;
20 #if defined(OS_MACOSX) 21 #if defined(OS_MACOSX)
21 ASSERT_TRUE(PathService::Get(base::DIR_APP_DATA, &test_profile_dir)); 22 ASSERT_TRUE(PathService::Get(base::DIR_APP_DATA, &test_profile_dir));
22 test_profile_dir = test_profile_dir.Append("foobar"); 23 test_profile_dir = test_profile_dir.Append("foobar");
(...skipping 25 matching lines...) Expand all
48 // Verify that a profile in some other random directory doesn't use 49 // Verify that a profile in some other random directory doesn't use
49 // the special cache dir. 50 // the special cache dir.
50 test_profile_dir = base::FilePath(FILE_PATH_LITERAL("/some/other/path")); 51 test_profile_dir = base::FilePath(FILE_PATH_LITERAL("/some/other/path"));
51 chrome::GetUserCacheDirectory(test_profile_dir, &cache_dir); 52 chrome::GetUserCacheDirectory(test_profile_dir, &cache_dir);
52 #if defined(OS_ANDROID) 53 #if defined(OS_ANDROID)
53 EXPECT_EQ(expected_cache_dir.value(), cache_dir.value()); 54 EXPECT_EQ(expected_cache_dir.value(), cache_dir.value());
54 #else 55 #else
55 EXPECT_EQ(test_profile_dir.value(), cache_dir.value()); 56 EXPECT_EQ(test_profile_dir.value(), cache_dir.value());
56 #endif 57 #endif
57 } 58 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths_mac.mm ('k') | chrome/common/chrome_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698