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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_delegate_impl_win_unittest.cc

Issue 2664073003: Destroy MediaFileSystemRegistry before StorageMonitor in MTPDeviceDelegateImplWinTest. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 extension_system->CreateExtensionService( 104 extension_system->CreateExtensionService(
105 base::CommandLine::ForCurrentProcess(), base::FilePath(), false); 105 base::CommandLine::ForCurrentProcess(), base::FilePath(), false);
106 106
107 std::vector<std::string> all_permissions; 107 std::vector<std::string> all_permissions;
108 all_permissions.push_back("allAutoDetected"); 108 all_permissions.push_back("allAutoDetected");
109 all_permissions.push_back("read"); 109 all_permissions.push_back("read");
110 extension_ = AddMediaGalleriesApp("all", all_permissions, profile()); 110 extension_ = AddMediaGalleriesApp("all", all_permissions, profile());
111 } 111 }
112 112
113 void MTPDeviceDelegateImplWinTest::TearDown() { 113 void MTPDeviceDelegateImplWinTest::TearDown() {
114 // The MediaFileSystemRegistry owned by the TestingBrowserProcess must be
115 // destroyed before the StorageMonitor because it calls
116 // StorageMonitor::RemoveObserver() in its destructor.
117 TestingBrowserProcess::DeleteInstance();
118
114 // Windows storage monitor must be destroyed on the same thread 119 // Windows storage monitor must be destroyed on the same thread
115 // as construction. 120 // as construction.
116 TestStorageMonitor::Destroy(); 121 TestStorageMonitor::Destroy();
117 122
118 ChromeRenderViewHostTestHarness::TearDown(); 123 ChromeRenderViewHostTestHarness::TearDown();
119 } 124 }
120 125
121 void MTPDeviceDelegateImplWinTest::ProcessAttach( 126 void MTPDeviceDelegateImplWinTest::ProcessAttach(
122 const std::string& id, 127 const std::string& id,
123 const base::string16& label, 128 const base::string16& label,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { 180 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) {
176 MediaFileSystemInfo info = i->second; 181 MediaFileSystemInfo info = i->second;
177 if (info.path == location) { 182 if (info.path == location) {
178 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); 183 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true);
179 checked = true; 184 checked = true;
180 break; 185 break;
181 } 186 }
182 } 187 }
183 EXPECT_TRUE(checked); 188 EXPECT_TRUE(checked);
184 } 189 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698