| Index: chrome/browser/download/download_util_unittest.cc
|
| diff --git a/chrome/browser/download/download_util_unittest.cc b/chrome/browser/download/download_util_unittest.cc
|
| index c8143e2f314c6d1a184111d29f88c482ba13b1c4..f41fb9d8b848cc5e563fdaee4277730d59965451 100644
|
| --- a/chrome/browser/download/download_util_unittest.cc
|
| +++ b/chrome/browser/download/download_util_unittest.cc
|
| @@ -8,8 +8,10 @@
|
| #include <locale.h>
|
| #endif
|
|
|
| +#include "base/path_service.h"
|
| #include "base/string_util.h"
|
| #include "base/test/test_file_util.h"
|
| +#include "chrome/common/chrome_paths.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -578,5 +580,22 @@ TEST(DownloadUtilTest, GenerateSafeFileName) {
|
| }
|
| }
|
|
|
| -} // namespace
|
| +TEST(DownloadUtilTest, OverrideDefaultDownloadFolder) {
|
| + FilePath override_path(FILE_PATH_LITERAL("/koakuma/mikity/moemoe/nyannyan"));
|
| + FilePath original_path;
|
| + ASSERT_TRUE(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &original_path));
|
| +
|
| + FilePath current_path;
|
| + ASSERT_TRUE(download_util::DefaultDownloadDirectory::Get(¤t_path));
|
| + EXPECT_EQ(current_path, original_path);
|
| +
|
| + download_util::DefaultDownloadDirectory::Override(override_path);
|
| + ASSERT_TRUE(download_util::DefaultDownloadDirectory::Get(¤t_path));
|
| + EXPECT_EQ(current_path, override_path);
|
|
|
| + download_util::DefaultDownloadDirectory::UnOverride();
|
| + ASSERT_TRUE(download_util::DefaultDownloadDirectory::Get(¤t_path));
|
| + EXPECT_EQ(current_path, original_path);
|
| +}
|
| +
|
| +} // namespace
|
|
|