OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/base_paths.h" | 5 #include "base/base_paths.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 EXPECT_EQ(find_folders_start_count_, find_folders_destroy_count_); | 99 EXPECT_EQ(find_folders_start_count_, find_folders_destroy_count_); |
100 } | 100 } |
101 | 101 |
102 void SetUp() override { | 102 void SetUp() override { |
103 ASSERT_TRUE(storage_monitor::TestStorageMonitor::CreateAndInstall()); | 103 ASSERT_TRUE(storage_monitor::TestStorageMonitor::CreateAndInstall()); |
104 | 104 |
105 extensions::TestExtensionSystem* extension_system( | 105 extensions::TestExtensionSystem* extension_system( |
106 static_cast<extensions::TestExtensionSystem*>( | 106 static_cast<extensions::TestExtensionSystem*>( |
107 extensions::ExtensionSystem::Get(profile_.get()))); | 107 extensions::ExtensionSystem::Get(profile_.get()))); |
108 extension_system->CreateExtensionService( | 108 extension_system->CreateExtensionService( |
109 CommandLine::ForCurrentProcess(), base::FilePath(), false); | 109 base::CommandLine::ForCurrentProcess(), base::FilePath(), false); |
110 | 110 |
111 gallery_prefs_ = | 111 gallery_prefs_ = |
112 MediaGalleriesPreferencesFactory::GetForProfile(profile_.get()); | 112 MediaGalleriesPreferencesFactory::GetForProfile(profile_.get()); |
113 base::RunLoop loop; | 113 base::RunLoop loop; |
114 gallery_prefs_->EnsureInitialized(loop.QuitClosure()); | 114 gallery_prefs_->EnsureInitialized(loop.QuitClosure()); |
115 loop.Run(); | 115 loop.Run(); |
116 | 116 |
117 std::vector<std::string> read_permissions; | 117 std::vector<std::string> read_permissions; |
118 read_permissions.push_back( | 118 read_permissions.push_back( |
119 extensions::MediaGalleriesPermission::kReadPermission); | 119 extensions::MediaGalleriesPermission::kReadPermission); |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 file_counts.audio_count *= kGalleriesAdded; | 722 file_counts.audio_count *= kGalleriesAdded; |
723 file_counts.image_count *= kGalleriesAdded; | 723 file_counts.image_count *= kGalleriesAdded; |
724 file_counts.video_count *= kGalleriesAdded; | 724 file_counts.video_count *= kGalleriesAdded; |
725 SetExpectedScanResults(kGalleriesAdded, file_counts); | 725 SetExpectedScanResults(kGalleriesAdded, file_counts); |
726 StartScan(); | 726 StartScan(); |
727 | 727 |
728 base::RunLoop().RunUntilIdle(); | 728 base::RunLoop().RunUntilIdle(); |
729 EXPECT_EQ(1, FindFolderDestroyCount()); | 729 EXPECT_EQ(1, FindFolderDestroyCount()); |
730 EXPECT_EQ(galleries_before + kGalleriesAdded, gallery_count()); | 730 EXPECT_EQ(galleries_before + kGalleriesAdded, gallery_count()); |
731 } | 731 } |
OLD | NEW |