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

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

Issue 8049002: Don't show hidden devices in UI (exept from imageburner). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'mock library update' Created 9 years, 2 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 | « chrome/browser/extensions/extension_file_browser_private_api.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/cros/cros_library.h" 7 #include "chrome/browser/chromeos/cros/cros_library.h"
8 #include "chrome/browser/chromeos/cros/mock_mount_library.h" 8 #include "chrome/browser/chromeos/cros/mock_mount_library.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "file_path1", 54 "file_path1",
55 "device_label1", 55 "device_label1",
56 "drive_label1", 56 "drive_label1",
57 "parent_path1", 57 "parent_path1",
58 "system_path_prefix1", 58 "system_path_prefix1",
59 chromeos::FLASH, 59 chromeos::FLASH,
60 1073741824, 60 1073741824,
61 false, 61 false,
62 false, 62 false,
63 false, 63 false,
64 false,
64 false))); 65 false)));
65 volumes_.insert( 66 volumes_.insert(
66 std::pair<std::string, chromeos::MountLibrary::Disk*>( 67 std::pair<std::string, chromeos::MountLibrary::Disk*>(
67 "device_path2", 68 "device_path2",
68 new chromeos::MountLibrary::Disk("device_path2", 69 new chromeos::MountLibrary::Disk("device_path2",
69 "/media/removable/mount_path2", 70 "/media/removable/mount_path2",
70 "system_path2", 71 "system_path2",
71 "file_path2", 72 "file_path2",
72 "device_label2", 73 "device_label2",
73 "drive_label2", 74 "drive_label2",
74 "parent_path2", 75 "parent_path2",
75 "system_path_prefix2", 76 "system_path_prefix2",
76 chromeos::HDD, 77 chromeos::HDD,
77 47723, 78 47723,
78 true, 79 true,
79 true, 80 true,
80 true, 81 true,
81 true))); 82 true,
83 false)));
82 volumes_.insert( 84 volumes_.insert(
83 std::pair<std::string, chromeos::MountLibrary::Disk*>( 85 std::pair<std::string, chromeos::MountLibrary::Disk*>(
84 "device_path3", 86 "device_path3",
85 new chromeos::MountLibrary::Disk("device_path3", 87 new chromeos::MountLibrary::Disk("device_path3",
86 "/media/removable/mount_path3", 88 "/media/removable/mount_path3",
87 "system_path3", 89 "system_path3",
88 "file_path3", 90 "file_path3",
89 "device_label3", 91 "device_label3",
90 "drive_label3", 92 "drive_label3",
91 "parent_path3", 93 "parent_path3",
92 "system_path_prefix3", 94 "system_path_prefix3",
93 chromeos::OPTICAL, 95 chromeos::OPTICAL,
94 0, 96 0,
95 true, 97 true,
96 false, 98 false,
97 false, 99 false,
98 true))); 100 true,
101 false)));
99 } 102 }
100 103
101 void DeleteVolumeMap() { 104 void DeleteVolumeMap() {
102 for (chromeos::MountLibrary::DiskMap::iterator it = volumes_.begin(); 105 for (chromeos::MountLibrary::DiskMap::iterator it = volumes_.begin();
103 it != volumes_.end(); 106 it != volumes_.end();
104 ++it) { 107 ++it) {
105 delete it->second; 108 delete it->second;
106 } 109 }
107 volumes_.clear(); 110 volumes_.clear();
108 } 111 }
(...skipping 14 matching lines...) Expand all
123 .Times(0); 126 .Times(0);
124 EXPECT_CALL(mount_library_mock_, UnmountPath(StrEq("/tmp/test_file.zip"))) 127 EXPECT_CALL(mount_library_mock_, UnmountPath(StrEq("/tmp/test_file.zip")))
125 .Times(1); 128 .Times(1);
126 129
127 EXPECT_CALL(mount_library_mock_, disks()) 130 EXPECT_CALL(mount_library_mock_, disks())
128 .WillRepeatedly(ReturnRef(volumes_)); 131 .WillRepeatedly(ReturnRef(volumes_));
129 132
130 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_; 133 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_;
131 } 134 }
132 135
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_file_browser_private_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698