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

Side by Side Diff: chrome/browser/media_gallery/media_storage_util_unittest.cc

Issue 10869067: Deliver attach intent to packaged apps (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: sync to head Created 8 years, 3 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 (c) 2012 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 <string>
6
7 #include "chrome/browser/media_gallery/media_storage_util.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace chrome {
11
12 class MediaStorageUtilTest : public testing::Test {
13 public:
14 MediaStorageUtilTest() {}
15 };
16
17 TEST_F(MediaStorageUtilTest, DeviceId) {
18 std::string unique_id = "uniqueId_abcdef";
19 MediaStorageUtil::Type type = MediaStorageUtil::USB_MASS_STORAGE_WITH_DCIM;
20
21 std::string device_id = MediaStorageUtil::MakeDeviceId(type, unique_id);
22 ASSERT_TRUE(MediaStorageUtil::IsMediaDevice(device_id));
23 ASSERT_TRUE(MediaStorageUtil::IsRemovableDevice(device_id));
24
25 ASSERT_TRUE(MediaStorageUtil::CrackDeviceId("mtp:fake", &type, &unique_id));
26 ASSERT_EQ(MediaStorageUtil::USB_MTP, type);
27 ASSERT_EQ("fake", unique_id);
28 }
29
30 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698