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

Side by Side Diff: chrome/browser/extensions/extension_file_browser_private_apitest.cc

Issue 9019002: [CrosDisksClient] Determine device type from DeviceMediaType property sent by cros-disks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/chromeos/disks/mock_disk_mount_manager.h" 8 #include "chrome/browser/chromeos/disks/mock_disk_mount_manager.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 std::pair<std::string, chromeos::disks::DiskMountManager::Disk*>( 60 std::pair<std::string, chromeos::disks::DiskMountManager::Disk*>(
61 "device_path1", 61 "device_path1",
62 new chromeos::disks::DiskMountManager::Disk( 62 new chromeos::disks::DiskMountManager::Disk(
63 "device_path1", 63 "device_path1",
64 "/media/removable/mount_path1", 64 "/media/removable/mount_path1",
65 "system_path1", 65 "system_path1",
66 "file_path1", 66 "file_path1",
67 "device_label1", 67 "device_label1",
68 "drive_label1", 68 "drive_label1",
69 "system_path_prefix1", 69 "system_path_prefix1",
70 chromeos::FLASH, 70 chromeos::DEVICE_TYPE_USB,
71 1073741824, 71 1073741824,
72 false, 72 false,
73 false, 73 false,
74 false, 74 false,
75 false, 75 false,
76 false))); 76 false)));
77 volumes_.insert( 77 volumes_.insert(
78 std::pair<std::string, chromeos::disks::DiskMountManager::Disk*>( 78 std::pair<std::string, chromeos::disks::DiskMountManager::Disk*>(
79 "device_path2", 79 "device_path2",
80 new chromeos::disks::DiskMountManager::Disk( 80 new chromeos::disks::DiskMountManager::Disk(
81 "device_path2", 81 "device_path2",
82 "/media/removable/mount_path2", 82 "/media/removable/mount_path2",
83 "system_path2", 83 "system_path2",
84 "file_path2", 84 "file_path2",
85 "device_label2", 85 "device_label2",
86 "drive_label2", 86 "drive_label2",
87 "system_path_prefix2", 87 "system_path_prefix2",
88 chromeos::HDD, 88 chromeos::DEVICE_TYPE_MOBILE,
89 47723, 89 47723,
90 true, 90 true,
91 true, 91 true,
92 true, 92 true,
93 true, 93 true,
94 false))); 94 false)));
95 volumes_.insert( 95 volumes_.insert(
96 std::pair<std::string, chromeos::disks::DiskMountManager::Disk*>( 96 std::pair<std::string, chromeos::disks::DiskMountManager::Disk*>(
97 "device_path3", 97 "device_path3",
98 new chromeos::disks::DiskMountManager::Disk( 98 new chromeos::disks::DiskMountManager::Disk(
99 "device_path3", 99 "device_path3",
100 "/media/removable/mount_path3", 100 "/media/removable/mount_path3",
101 "system_path3", 101 "system_path3",
102 "file_path3", 102 "file_path3",
103 "device_label3", 103 "device_label3",
104 "drive_label3", 104 "drive_label3",
105 "system_path_prefix3", 105 "system_path_prefix3",
106 chromeos::OPTICAL, 106 chromeos::DEVICE_TYPE_OPTICAL_DISC,
107 0, 107 0,
108 true, 108 true,
109 false, 109 false,
110 false, 110 false,
111 true, 111 true,
112 false))); 112 false)));
113 } 113 }
114 114
115 protected: 115 protected:
116 chromeos::disks::MockDiskMountManager* disk_mount_manager_mock_; 116 chromeos::disks::MockDiskMountManager* disk_mount_manager_mock_;
(...skipping 10 matching lines...) Expand all
127 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_)) 127 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_))
128 .Times(0); 128 .Times(0);
129 EXPECT_CALL(*disk_mount_manager_mock_, 129 EXPECT_CALL(*disk_mount_manager_mock_,
130 UnmountPath(StrEq("/tmp/test_file.zip"))).Times(1); 130 UnmountPath(StrEq("/tmp/test_file.zip"))).Times(1);
131 131
132 EXPECT_CALL(*disk_mount_manager_mock_, disks()) 132 EXPECT_CALL(*disk_mount_manager_mock_, disks())
133 .WillRepeatedly(ReturnRef(volumes_)); 133 .WillRepeatedly(ReturnRef(volumes_));
134 134
135 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_; 135 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_;
136 } 136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698