using content::BrowserThread;
+namespace storage_monitor {
+
class MediaStorageUtilTest : public testing::Test {
public:
MediaStorageUtilTest()
}
void ProcessAttach(const std::string& id,
- const base::string16& name,
const base::FilePath::StringType& location) {
- StorageInfo info(id, name, location, base::string16(), base::string16(),
+ StorageInfo info(id, location, base::string16(), base::string16(),
base::string16(), 0);
monitor_->receiver()->ProcessAttach(info);
}
EXPECT_TRUE(MediaStorageUtil::CanCreateFileSystem(kImageCaptureDeviceId,
base::FilePath()));
EXPECT_FALSE(MediaStorageUtil::CanCreateFileSystem(
+ "dcim:xyz", base::FilePath()));
+ EXPECT_FALSE(MediaStorageUtil::CanCreateFileSystem(
"dcim:xyz", base::FilePath(FILE_PATH_LITERAL("relative"))));
EXPECT_FALSE(MediaStorageUtil::CanCreateFileSystem(
"dcim:xyz", base::FilePath(FILE_PATH_LITERAL("../refparent"))));
event.Wait();
EXPECT_FALSE(devices.find(kImageCaptureDeviceId) != devices.end());
- ProcessAttach(kImageCaptureDeviceId, base::ASCIIToUTF16("name"),
- FILE_PATH_LITERAL("/location"));
+ ProcessAttach(kImageCaptureDeviceId, FILE_PATH_LITERAL("/location"));
devices.insert(kImageCaptureDeviceId);
event.Reset();
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
EXPECT_TRUE(devices.find(kImageCaptureDeviceId) != devices.end());
}
+
+} // namespace storage_monitor