| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 } | 635 } |
| 636 | 636 |
| 637 TEST(PermissionsTest, PermissionMessages) { | 637 TEST(PermissionsTest, PermissionMessages) { |
| 638 // Ensure that all permissions that needs to show install UI actually have | 638 // Ensure that all permissions that needs to show install UI actually have |
| 639 // strings associated with them. | 639 // strings associated with them. |
| 640 APIPermissionSet skip; | 640 APIPermissionSet skip; |
| 641 | 641 |
| 642 // These are considered "nuisance" or "trivial" permissions that don't need | 642 // These are considered "nuisance" or "trivial" permissions that don't need |
| 643 // a prompt. | 643 // a prompt. |
| 644 skip.insert(APIPermission::kActiveTab); | 644 skip.insert(APIPermission::kActiveTab); |
| 645 skip.insert(APIPermission::kAdView); | |
| 646 skip.insert(APIPermission::kAlarms); | 645 skip.insert(APIPermission::kAlarms); |
| 647 skip.insert(APIPermission::kAlwaysOnTopWindows); | 646 skip.insert(APIPermission::kAlwaysOnTopWindows); |
| 648 skip.insert(APIPermission::kAudio); | 647 skip.insert(APIPermission::kAudio); |
| 649 skip.insert(APIPermission::kBrowsingData); | 648 skip.insert(APIPermission::kBrowsingData); |
| 650 skip.insert(APIPermission::kCastStreaming); | 649 skip.insert(APIPermission::kCastStreaming); |
| 651 skip.insert(APIPermission::kContextMenus); | 650 skip.insert(APIPermission::kContextMenus); |
| 652 skip.insert(APIPermission::kDiagnostics); | 651 skip.insert(APIPermission::kDiagnostics); |
| 653 skip.insert(APIPermission::kDns); | 652 skip.insert(APIPermission::kDns); |
| 654 skip.insert(APIPermission::kDownloadsShelf); | 653 skip.insert(APIPermission::kDownloadsShelf); |
| 655 skip.insert(APIPermission::kFontSettings); | 654 skip.insert(APIPermission::kFontSettings); |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 scoped_refptr<const PermissionSet> permissions_dwr( | 1646 scoped_refptr<const PermissionSet> permissions_dwr( |
| 1648 extension_dwr->permissions_data()->active_permissions()); | 1647 extension_dwr->permissions_data()->active_permissions()); |
| 1649 | 1648 |
| 1650 EXPECT_FALSE(PermissionMessageProvider::Get()-> | 1649 EXPECT_FALSE(PermissionMessageProvider::Get()-> |
| 1651 IsPrivilegeIncrease(permissions.get(), | 1650 IsPrivilegeIncrease(permissions.get(), |
| 1652 permissions_dwr.get(), | 1651 permissions_dwr.get(), |
| 1653 extension->GetType())); | 1652 extension->GetType())); |
| 1654 } | 1653 } |
| 1655 | 1654 |
| 1656 } // namespace extensions | 1655 } // namespace extensions |
| OLD | NEW |