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 // MediaFileSystemRegistry unit tests. | 5 // MediaFileSystemRegistry unit tests. |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 | 759 |
760 test_file_system_context_ = new TestMediaFileSystemContext( | 760 test_file_system_context_ = new TestMediaFileSystemContext( |
761 g_browser_process->media_file_system_registry()); | 761 g_browser_process->media_file_system_registry()); |
762 | 762 |
763 #if defined(OS_CHROMEOS) | 763 #if defined(OS_CHROMEOS) |
764 test_user_manager_.reset(new chromeos::ScopedTestUserManager()); | 764 test_user_manager_.reset(new chromeos::ScopedTestUserManager()); |
765 #endif | 765 #endif |
766 | 766 |
767 ASSERT_TRUE(galleries_dir_.CreateUniqueTempDir()); | 767 ASSERT_TRUE(galleries_dir_.CreateUniqueTempDir()); |
768 empty_dir_ = galleries_dir_.path().AppendASCII("empty"); | 768 empty_dir_ = galleries_dir_.path().AppendASCII("empty"); |
769 ASSERT_TRUE(file_util::CreateDirectory(empty_dir_)); | 769 ASSERT_TRUE(base::CreateDirectory(empty_dir_)); |
770 dcim_dir_ = galleries_dir_.path().AppendASCII("with_dcim"); | 770 dcim_dir_ = galleries_dir_.path().AppendASCII("with_dcim"); |
771 ASSERT_TRUE(file_util::CreateDirectory(dcim_dir_)); | 771 ASSERT_TRUE(base::CreateDirectory(dcim_dir_)); |
772 ASSERT_TRUE(file_util::CreateDirectory(dcim_dir_.Append(kDCIMDirectoryName))); | 772 ASSERT_TRUE(base::CreateDirectory(dcim_dir_.Append(kDCIMDirectoryName))); |
773 } | 773 } |
774 | 774 |
775 void MediaFileSystemRegistryTest::TearDown() { | 775 void MediaFileSystemRegistryTest::TearDown() { |
776 profile_states_.clear(); | 776 profile_states_.clear(); |
777 MediaFileSystemRegistry* registry = | 777 MediaFileSystemRegistry* registry = |
778 g_browser_process->media_file_system_registry(); | 778 g_browser_process->media_file_system_registry(); |
779 EXPECT_EQ(0U, GetExtensionGalleriesHostCount(registry)); | 779 EXPECT_EQ(0U, GetExtensionGalleriesHostCount(registry)); |
780 TestStorageMonitor::RemoveSingleton(); | 780 TestStorageMonitor::RemoveSingleton(); |
781 #if defined(OS_CHROMEOS) | 781 #if defined(OS_CHROMEOS) |
782 test_user_manager_.reset(); | 782 test_user_manager_.reset(); |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); | 1050 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); |
1051 #else | 1051 #else |
1052 profile_state->AddNameForAllCompare(path.LossyDisplayName()); | 1052 profile_state->AddNameForAllCompare(path.LossyDisplayName()); |
1053 #endif | 1053 #endif |
1054 | 1054 |
1055 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); | 1055 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); |
1056 } else { | 1056 } else { |
1057 profile_state->CheckGalleries("names", one_expectation, one_expectation); | 1057 profile_state->CheckGalleries("names", one_expectation, one_expectation); |
1058 } | 1058 } |
1059 } | 1059 } |
OLD | NEW |