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

Side by Side Diff: chrome/common/extensions/permissions/permission_set_unittest.cc

Issue 415293002: Current host warning "Read and modify your data .." should say "Read and change your data .." to ma… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a typo in a test Created 6 years, 5 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
OLDNEW
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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } 1075 }
1076 1076
1077 TEST(PermissionsTest, GetWarningMessages_ManyHosts) { 1077 TEST(PermissionsTest, GetWarningMessages_ManyHosts) {
1078 scoped_refptr<Extension> extension; 1078 scoped_refptr<Extension> extension;
1079 1079
1080 extension = LoadManifest("permissions", "many-hosts.json"); 1080 extension = LoadManifest("permissions", "many-hosts.json");
1081 std::vector<base::string16> warnings = 1081 std::vector<base::string16> warnings =
1082 extension->permissions_data()->GetPermissionMessageStrings(); 1082 extension->permissions_data()->GetPermissionMessageStrings();
1083 ASSERT_EQ(1u, warnings.size()); 1083 ASSERT_EQ(1u, warnings.size());
1084 EXPECT_EQ( 1084 EXPECT_EQ(
1085 "Read and modify your data on encrypted.google.com and " 1085 "Read and change your data on encrypted.google.com and "
1086 "www.google.com", 1086 "www.google.com",
1087 base::UTF16ToUTF8(warnings[0])); 1087 base::UTF16ToUTF8(warnings[0]));
1088 } 1088 }
1089 1089
1090 TEST(PermissionsTest, GetWarningMessages_Plugins) { 1090 TEST(PermissionsTest, GetWarningMessages_Plugins) {
1091 scoped_refptr<Extension> extension; 1091 scoped_refptr<Extension> extension;
1092 scoped_refptr<PermissionSet> permissions; 1092 scoped_refptr<PermissionSet> permissions;
1093 1093
1094 extension = LoadManifest("permissions", "plugins.json"); 1094 extension = LoadManifest("permissions", "plugins.json");
1095 std::vector<base::string16> warnings = 1095 std::vector<base::string16> warnings =
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 scoped_refptr<const PermissionSet> permissions_dwr( 1789 scoped_refptr<const PermissionSet> permissions_dwr(
1790 extension_dwr->permissions_data()->active_permissions()); 1790 extension_dwr->permissions_data()->active_permissions());
1791 1791
1792 EXPECT_FALSE(PermissionMessageProvider::Get()-> 1792 EXPECT_FALSE(PermissionMessageProvider::Get()->
1793 IsPrivilegeIncrease(permissions.get(), 1793 IsPrivilegeIncrease(permissions.get(),
1794 permissions_dwr.get(), 1794 permissions_dwr.get(),
1795 extension->GetType())); 1795 extension->GetType()));
1796 } 1796 }
1797 1797
1798 } // namespace extensions 1798 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698