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

Side by Side Diff: chrome/common/extensions/image_writer/image_writer_util_mac_unittest.cc

Issue 294163008: Adds USB writing for OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@list-devices
Patch Set: Creates a location for code shared between browser and utility process. Created 6 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/common/extensions/image_writer/image_writer_test_util_mac.h"
6 #include "chrome/common/extensions/image_writer/image_writer_util_mac.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace extensions {
10 namespace image_writer {
11
12 namespace {
13
14 class ImageWriterTestUtilsTest : public testing::Test {};
15
16 } // namespace
17
18 // Tests IsRemovableDevice.
19 TEST_F(ImageWriterTestUtilsTest, DiskIsValidTarget) {
Robert Sesek 2014/06/10 19:47:46 You can just use TEST(ImageWriterTestUtilsTest, Di
Drew Haven 2014/06/12 02:24:26 Done.
20 base::ScopedCFTypeRef<CFDictionaryRef> fixed_disk = CreateDiskDictionary(
21 "disk0", "Fixed Vendor", "Fixed Model", (int64)1 << 40, DriveType::FIXED);
22 base::ScopedCFTypeRef<CFDictionaryRef> cd_drive =
23 CreateDiskDictionary("disk1", "CD Vendor", "CD Model", 0, DriveType::CD);
24 base::ScopedCFTypeRef<CFDictionaryRef> usb_stick = CreateDiskDictionary(
25 "disk2", "USB Vendor", "USB Model", (int64)1 << 32, DriveType::USB);
26 base::ScopedCFTypeRef<CFDictionaryRef> sd_card = CreateDiskDictionary(
27 "disk3", "SD Vendor", "SD Model", (int64)1 << 33, DriveType::SD);
28 ASSERT_FALSE(IsRemovableDevice(fixed_disk));
29 ASSERT_FALSE(IsRemovableDevice(cd_drive));
30 ASSERT_TRUE(IsRemovableDevice(usb_stick));
31 ASSERT_TRUE(IsRemovableDevice(sd_card));
32 }
33
34 } // image_writer
35 } // extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698