OLD | NEW |
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 "base/stl_util.h" | 5 #include "base/stl_util.h" |
6 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" | 6 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chromeos/dbus/cros_disks_client.h" | 8 #include "chromeos/dbus/cros_disks_client.h" |
9 #include "chromeos/disks/mock_disk_mount_manager.h" | 9 #include "chromeos/disks/mock_disk_mount_manager.h" |
10 #include "extensions/common/extension.h" | 10 #include "extensions/common/extension.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 "abcd", | 59 "abcd", |
60 "product1", | 60 "product1", |
61 "FFFF-FFFF", | 61 "FFFF-FFFF", |
62 "system_path_prefix1", | 62 "system_path_prefix1", |
63 chromeos::DEVICE_TYPE_USB, | 63 chromeos::DEVICE_TYPE_USB, |
64 1073741824, | 64 1073741824, |
65 false, | 65 false, |
66 false, | 66 false, |
67 false, | 67 false, |
68 false, | 68 false, |
69 false, | |
70 false | 69 false |
71 }, | 70 }, |
72 { | 71 { |
73 "system_path2", | 72 "system_path2", |
74 "file_path2", | 73 "file_path2", |
75 "device_label2", | 74 "device_label2", |
76 "drive_label2", | 75 "drive_label2", |
77 "4567", | 76 "4567", |
78 "vendor2", | 77 "vendor2", |
79 "cdef", | 78 "cdef", |
80 "product2", | 79 "product2", |
81 "0FFF-FFFF", | 80 "0FFF-FFFF", |
82 "system_path_prefix2", | 81 "system_path_prefix2", |
83 chromeos::DEVICE_TYPE_MOBILE, | 82 chromeos::DEVICE_TYPE_MOBILE, |
84 47723, | 83 47723, |
85 true, | 84 true, |
86 true, | 85 true, |
87 true, | 86 true, |
88 true, | 87 true, |
89 false, | |
90 false | 88 false |
91 }, | 89 }, |
92 { | 90 { |
93 "system_path3", | 91 "system_path3", |
94 "file_path3", | 92 "file_path3", |
95 "device_label3", | 93 "device_label3", |
96 "drive_label3", | 94 "drive_label3", |
97 "89ab", | 95 "89ab", |
98 "vendor3", | 96 "vendor3", |
99 "ef01", | 97 "ef01", |
100 "product3", | 98 "product3", |
101 "00FF-FFFF", | 99 "00FF-FFFF", |
102 "system_path_prefix3", | 100 "system_path_prefix3", |
103 chromeos::DEVICE_TYPE_OPTICAL_DISC, | 101 chromeos::DEVICE_TYPE_OPTICAL_DISC, |
104 0, | 102 0, |
105 true, | 103 true, |
106 false, | 104 false, |
107 false, | 105 false, |
108 true, | 106 true, |
109 false, | |
110 false | 107 false |
111 } | 108 } |
112 }; | 109 }; |
113 | 110 |
114 } // namespace | 111 } // namespace |
115 | 112 |
116 class FileManagerPrivateApiTest : public ExtensionApiTest { | 113 class FileManagerPrivateApiTest : public ExtensionApiTest { |
117 public: | 114 public: |
118 FileManagerPrivateApiTest() | 115 FileManagerPrivateApiTest() |
119 : disk_mount_manager_mock_(NULL) { | 116 : disk_mount_manager_mock_(NULL) { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 263 |
267 IN_PROC_BROWSER_TEST_F(FileManagerPrivateApiTest, Permissions) { | 264 IN_PROC_BROWSER_TEST_F(FileManagerPrivateApiTest, Permissions) { |
268 EXPECT_TRUE( | 265 EXPECT_TRUE( |
269 RunExtensionTestIgnoreManifestWarnings("file_browser/permissions")); | 266 RunExtensionTestIgnoreManifestWarnings("file_browser/permissions")); |
270 const extensions::Extension* extension = GetSingleLoadedExtension(); | 267 const extensions::Extension* extension = GetSingleLoadedExtension(); |
271 ASSERT_TRUE(extension); | 268 ASSERT_TRUE(extension); |
272 ASSERT_EQ(1u, extension->install_warnings().size()); | 269 ASSERT_EQ(1u, extension->install_warnings().size()); |
273 const extensions::InstallWarning& warning = extension->install_warnings()[0]; | 270 const extensions::InstallWarning& warning = extension->install_warnings()[0]; |
274 EXPECT_EQ("fileManagerPrivate", warning.key); | 271 EXPECT_EQ("fileManagerPrivate", warning.key); |
275 } | 272 } |
OLD | NEW |