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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc

Issue 19489006: Media Galleries: Move gallery name generation back to StorageMonitor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries_private/media_galleries_eject_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ResultCatcher catcher; 79 ResultCatcher catcher;
80 host->render_view_host()->ExecuteJavascriptInWebFrame(string16(), command); 80 host->render_view_host()->ExecuteJavascriptInWebFrame(string16(), command);
81 EXPECT_TRUE(catcher.GetNextResult()) << message_; 81 EXPECT_TRUE(catcher.GetNextResult()) << message_;
82 } 82 }
83 83
84 void AttachFakeDevice() { 84 void AttachFakeDevice() {
85 device_id_ = chrome::StorageInfo::MakeDeviceId( 85 device_id_ = chrome::StorageInfo::MakeDeviceId(
86 chrome::StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM, kDeviceId); 86 chrome::StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM, kDeviceId);
87 87
88 chrome::StorageMonitor::GetInstance()->receiver()->ProcessAttach( 88 chrome::StorageMonitor::GetInstance()->receiver()->ProcessAttach(
89 chrome::StorageInfo(device_id_, string16(), kDevicePath, 89 chrome::StorageInfo(device_id_, kDevicePath,
90 ASCIIToUTF16(kDeviceName), 90 base::ASCIIToUTF16(kDeviceName), base::string16(),
91 string16(), string16(), 0)); 91 base::string16(), 0));
92 content::RunAllPendingInMessageLoop(); 92 content::RunAllPendingInMessageLoop();
93 } 93 }
94 94
95 void DetachFakeDevice() { 95 void DetachFakeDevice() {
96 chrome::StorageMonitor::GetInstance()->receiver()->ProcessDetach( 96 chrome::StorageMonitor::GetInstance()->receiver()->ProcessDetach(
97 device_id_); 97 device_id_);
98 content::RunAllPendingInMessageLoop(); 98 content::RunAllPendingInMessageLoop();
99 } 99 }
100 100
101 private: 101 private:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 DetachFakeDevice(); 170 DetachFakeDevice();
171 } 171 }
172 172
173 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, 173 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest,
174 GetFilesystemMetadata) { 174 GetFilesystemMetadata) {
175 chrome::EnsureMediaDirectoriesExists media_directories; 175 chrome::EnsureMediaDirectoriesExists media_directories;
176 ASSERT_TRUE(RunPlatformAppTest("api_test/media_galleries/metadata")) 176 ASSERT_TRUE(RunPlatformAppTest("api_test/media_galleries/metadata"))
177 << message_; 177 << message_;
178 } 178 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries_private/media_galleries_eject_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698