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