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 "chrome/browser/media_galleries/media_galleries_test_util.h" | 5 #include "chrome/browser/media_galleries/media_galleries_test_util.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 void EnsureMediaDirectoriesExists::Init() { | 78 void EnsureMediaDirectoriesExists::Init() { |
79 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 79 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
80 return; | 80 return; |
81 #else | 81 #else |
82 | 82 |
83 ASSERT_TRUE(fake_dir_.CreateUniqueTempDir()); | 83 ASSERT_TRUE(fake_dir_.CreateUniqueTempDir()); |
84 | 84 |
85 #if defined(OS_WIN) || defined(OS_MACOSX) | 85 #if defined(OS_WIN) || defined(OS_MACOSX) |
86 // This is to make sure the tests don't think iTunes is installed (unless | 86 // This is to control whether or not tests think iTunes and Picasa are |
87 // we control it specifically). | 87 // installed. |
88 appdir_override_.reset(new base::ScopedPathOverride( | 88 app_data_override_.reset(new base::ScopedPathOverride( |
89 base::DIR_APP_DATA, fake_dir_.path().AppendASCII("itunes"))); | 89 base::DIR_APP_DATA, fake_dir_.path().AppendASCII("appdata"))); |
| 90 |
| 91 #if defined(OS_WIN) |
| 92 // Picasa on Windows is in the DIR_LOCAL_APP_DATA directory. |
| 93 local_app_data_override_.reset(new base::ScopedPathOverride( |
| 94 base::DIR_LOCAL_APP_DATA, |
| 95 fake_dir_.path().AppendASCII("local_app_data"))); |
| 96 #endif |
90 #endif | 97 #endif |
91 | 98 |
92 music_override_.reset(new base::ScopedPathOverride( | 99 music_override_.reset(new base::ScopedPathOverride( |
93 chrome::DIR_USER_MUSIC, fake_dir_.path().AppendASCII("music"))); | 100 chrome::DIR_USER_MUSIC, fake_dir_.path().AppendASCII("music"))); |
94 pictures_override_.reset(new base::ScopedPathOverride( | 101 pictures_override_.reset(new base::ScopedPathOverride( |
95 chrome::DIR_USER_PICTURES, fake_dir_.path().AppendASCII("pictures"))); | 102 chrome::DIR_USER_PICTURES, fake_dir_.path().AppendASCII("pictures"))); |
96 video_override_.reset(new base::ScopedPathOverride( | 103 video_override_.reset(new base::ScopedPathOverride( |
97 chrome::DIR_USER_VIDEOS, fake_dir_.path().AppendASCII("videos"))); | 104 chrome::DIR_USER_VIDEOS, fake_dir_.path().AppendASCII("videos"))); |
98 num_galleries_ = 3; | 105 num_galleries_ = 3; |
99 #endif | 106 #endif |
100 } | 107 } |
OLD | NEW |