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" |
| 11 #include "extensions/common/install_warning.h" |
10 | 12 |
11 using ::testing::_; | 13 using ::testing::_; |
12 using ::testing::ReturnRef; | 14 using ::testing::ReturnRef; |
13 | 15 |
14 using chromeos::disks::DiskMountManager; | 16 using chromeos::disks::DiskMountManager; |
15 | 17 |
16 namespace { | 18 namespace { |
17 | 19 |
18 struct TestDiskInfo { | 20 struct TestDiskInfo { |
19 const char* system_path; | 21 const char* system_path; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 .Times(0); | 253 .Times(0); |
252 EXPECT_CALL(*disk_mount_manager_mock_, | 254 EXPECT_CALL(*disk_mount_manager_mock_, |
253 UnmountPath( | 255 UnmountPath( |
254 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( | 256 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( |
255 "archive_mount_path").AsUTF8Unsafe(), | 257 "archive_mount_path").AsUTF8Unsafe(), |
256 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); | 258 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); |
257 | 259 |
258 ASSERT_TRUE(RunComponentExtensionTest("file_browser/mount_test")) | 260 ASSERT_TRUE(RunComponentExtensionTest("file_browser/mount_test")) |
259 << message_; | 261 << message_; |
260 } | 262 } |
| 263 |
| 264 IN_PROC_BROWSER_TEST_F(FileManagerPrivateApiTest, Permissions) { |
| 265 EXPECT_TRUE( |
| 266 RunExtensionTestIgnoreManifestWarnings("file_browser/permissions")); |
| 267 const extensions::Extension* extension = GetSingleLoadedExtension(); |
| 268 ASSERT_TRUE(extension); |
| 269 ASSERT_EQ(1u, extension->install_warnings().size()); |
| 270 const extensions::InstallWarning& warning = extension->install_warnings()[0]; |
| 271 EXPECT_EQ("fileManagerPrivate", warning.key); |
| 272 } |
OLD | NEW |