Commit 7da6ec43 authored by Guillaume Jenkins's avatar Guillaume Jenkins Committed by Chromium LUCI CQ

[iOS Enterprise] Mark completed policies as supported

Mark all policies that are ready and fully functional as "supported_on"
instead of "future_on" so they correctly show up as supported on iOS in
the Enterprise support pages.

Bug: 1153879
Change-Id: I08b9a166f257a71b44ea5f7345f5953e81ea7c5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566348
Commit-Queue: Guillaume Jenkins <gujen@google.com>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833380}
parent 94e5fedc
...@@ -1364,8 +1364,8 @@ ...@@ -1364,8 +1364,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -1787,8 +1787,8 @@ ...@@ -1787,8 +1787,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -2306,8 +2306,12 @@ ...@@ -2306,8 +2306,12 @@
'owners': ['file://components/policy/resources/OWNERS'], 'owners': ['file://components/policy/resources/OWNERS'],
'type': 'main', 'type': 'main',
'schema': { 'type': 'boolean' }, 'schema': { 'type': 'boolean' },
'supported_on': ['chrome.*:8-', 'chrome_os:11-', 'android:39-'], 'supported_on': [
'future_on': [ 'ios' ], 'chrome.*:8-',
'chrome_os:11-',
'android:39-',
'ios:88-',
],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -3082,8 +3086,8 @@ ...@@ -3082,8 +3086,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -3135,8 +3139,8 @@ ...@@ -3135,8 +3139,8 @@
'chrome.*:83-', 'chrome.*:83-',
'chrome_os:83-', 'chrome_os:83-',
'android:87-', 'android:87-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -3166,8 +3170,10 @@ ...@@ -3166,8 +3170,10 @@
'owners': ['file://components/policy/resources/OWNERS'], 'owners': ['file://components/policy/resources/OWNERS'],
'type': 'main', 'type': 'main',
'schema': { 'type': 'boolean' }, 'schema': { 'type': 'boolean' },
'supported_on': ['chrome.*:8-'], 'supported_on': [
'future_on': [ 'ios' ], 'chrome.*:8-',
'ios:88-',
],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': False, 'dynamic_refresh': False,
...@@ -3194,8 +3200,8 @@ ...@@ -3194,8 +3200,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -3297,8 +3303,8 @@ ...@@ -3297,8 +3303,8 @@
'chrome.*:69-', 'chrome.*:69-',
'chrome_os:69-', 'chrome_os:69-',
'android:69-', 'android:69-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -3321,8 +3327,8 @@ ...@@ -3321,8 +3327,8 @@
'chrome.*:63-', 'chrome.*:63-',
'chrome_os:63-', 'chrome_os:63-',
'android:63-', 'android:63-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -5102,8 +5108,8 @@ ...@@ -5102,8 +5108,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5149,8 +5155,8 @@ ...@@ -5149,8 +5155,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5172,8 +5178,8 @@ ...@@ -5172,8 +5178,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5195,8 +5201,8 @@ ...@@ -5195,8 +5201,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5218,8 +5224,8 @@ ...@@ -5218,8 +5224,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5264,8 +5270,8 @@ ...@@ -5264,8 +5270,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5290,8 +5296,8 @@ ...@@ -5290,8 +5296,8 @@
'chrome.*:8-', 'chrome.*:8-',
'chrome_os:11-', 'chrome_os:11-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5316,8 +5322,8 @@ ...@@ -5316,8 +5322,8 @@
'chrome.*:24-', 'chrome.*:24-',
'chrome_os:24-', 'chrome_os:24-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5360,8 +5366,8 @@ ...@@ -5360,8 +5366,8 @@
'chrome.*:29-', 'chrome.*:29-',
'chrome_os:29-', 'chrome_os:29-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5383,8 +5389,8 @@ ...@@ -5383,8 +5389,8 @@
'chrome.*:30-', 'chrome.*:30-',
'chrome_os:30-', 'chrome_os:30-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5406,8 +5412,8 @@ ...@@ -5406,8 +5412,8 @@
'chrome.*:29-', 'chrome.*:29-',
'chrome_os:29-', 'chrome_os:29-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5429,8 +5435,8 @@ ...@@ -5429,8 +5435,8 @@
'chrome.*:29-', 'chrome.*:29-',
'chrome_os:29-', 'chrome_os:29-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5473,8 +5479,8 @@ ...@@ -5473,8 +5479,8 @@
'chrome.*:29-', 'chrome.*:29-',
'chrome_os:29-', 'chrome_os:29-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -5664,8 +5670,8 @@ ...@@ -5664,8 +5670,8 @@
'chrome.*:10-', 'chrome.*:10-',
'chrome_os:11-', 'chrome_os:11-',
'android:33-', 'android:33-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -6874,8 +6880,8 @@ ...@@ -6874,8 +6880,8 @@
'chrome.*:11-', 'chrome.*:11-',
'chrome_os:11-', 'chrome_os:11-',
'android:34-', 'android:34-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -6943,8 +6949,8 @@ ...@@ -6943,8 +6949,8 @@
'chrome.*:11-', 'chrome.*:11-',
'chrome_os:11-', 'chrome_os:11-',
'android:34-', 'android:34-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -7637,8 +7643,8 @@ ...@@ -7637,8 +7643,8 @@
'chrome.*:12-', 'chrome.*:12-',
'chrome_os:12-', 'chrome_os:12-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'can_be_recommended': True, 'can_be_recommended': True,
'dynamic_refresh': True, 'dynamic_refresh': True,
...@@ -7738,8 +7744,8 @@ ...@@ -7738,8 +7744,8 @@
'chrome.*:12-', 'chrome.*:12-',
'chrome_os:12-', 'chrome_os:12-',
'android:30-', 'android:30-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -10386,9 +10392,9 @@ ...@@ -10386,9 +10392,9 @@
'supported_on': [ 'supported_on': [
'chrome.*:22-', 'chrome.*:22-',
'chrome_os:22-', 'chrome_os:22-',
'android:30-' 'android:30-',
'ios:88-',
], ],
'future_on': ['ios'],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -13260,8 +13266,10 @@ ...@@ -13260,8 +13266,10 @@
'caption': '''Disable all variations''', 'caption': '''Disable all variations''',
}, },
], ],
'supported_on': ['chrome.*:83-'], 'supported_on': [
'future_on': ['ios'], 'chrome.*:83-',
'ios:88-',
],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': False, 'per_profile': False,
...@@ -13531,8 +13539,8 @@ ...@@ -13531,8 +13539,8 @@
'android:30-', 'android:30-',
'chrome.*:37-', 'chrome.*:37-',
'chrome_os:37-', 'chrome_os:37-',
'ios:88-',
], ],
'future_on': [ 'ios' ],
'features': { 'features': {
'dynamic_refresh': True, 'dynamic_refresh': True,
'per_profile': True, 'per_profile': True,
...@@ -17144,8 +17152,10 @@ ...@@ -17144,8 +17152,10 @@
'owners': ['zmin@chromium.org', 'pastarmovj@chromium.org'], 'owners': ['zmin@chromium.org', 'pastarmovj@chromium.org'],
'type': 'main', 'type': 'main',
'schema': { 'type': 'boolean'}, 'schema': { 'type': 'boolean'},
'supported_on': ['chrome.*:75-'], 'supported_on': [
'future_on': ['ios'], 'chrome.*:75-',
'ios:88-',
],
'features': { 'features': {
'dynamic_refresh': False, 'dynamic_refresh': False,
'per_profile': False, 'per_profile': False,
...@@ -18228,8 +18238,10 @@ ...@@ -18228,8 +18238,10 @@
'owners': ['zmin@chromium.org', 'pastarmovj@chromium.org', 'rogerta@chromium.org'], 'owners': ['zmin@chromium.org', 'pastarmovj@chromium.org', 'rogerta@chromium.org'],
'type': 'string', 'type': 'string',
'schema': { 'type': 'string' }, 'schema': { 'type': 'string' },
'supported_on': ['chrome.*:72-'], 'supported_on': [
'future_on': [ 'ios' ], 'chrome.*:72-',
'ios:88-',
],
'features': { 'features': {
'dynamic_refresh': False, 'dynamic_refresh': False,
'per_profile': False, 'per_profile': False,
...@@ -19431,8 +19443,11 @@ ...@@ -19431,8 +19443,11 @@
'per_profile': False, 'per_profile': False,
'cloud_only': True, 'cloud_only': True,
}, },
'supported_on': ['chrome.*:72-', 'chrome_os:81-'], 'supported_on': [
'future_on': [ 'ios' ], 'chrome.*:72-',
'chrome_os:81-',
'ios:88-',
],
'caption': '''Enables <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> cloud reporting''', 'caption': '''Enables <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> cloud reporting''',
'example_value': True, 'example_value': True,
'desc': '''This policy controls <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> cloud reporting which uploads information about the browser operation to Google Admin console. 'desc': '''This policy controls <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> cloud reporting which uploads information about the browser operation to Google Admin console.
...@@ -39,10 +39,6 @@ const char kEnableSpotlightActions[] = "enable-spotlight-actions"; ...@@ -39,10 +39,6 @@ const char kEnableSpotlightActions[] = "enable-spotlight-actions";
const char kEnableThirdPartyKeyboardWorkaround[] = const char kEnableThirdPartyKeyboardWorkaround[] =
"enable-third-party-keyboard-workaround"; "enable-third-party-keyboard-workaround";
// Installs the managed bookmarks policy handler.
const char kInstallManagedBookmarksHandler[] =
"install-managed-bookmarks-handler";
// Installs the URLBlocklist and URLAllowlist handlers. // Installs the URLBlocklist and URLAllowlist handlers.
const char kInstallURLBlocklistHandlers[] = "install-url-blocklist-handlers"; const char kInstallURLBlocklistHandlers[] = "install-url-blocklist-handlers";
......
...@@ -17,7 +17,6 @@ extern const char kEnableEnterprisePolicy[]; ...@@ -17,7 +17,6 @@ extern const char kEnableEnterprisePolicy[];
extern const char kEnableIOSHandoffToOtherDevices[]; extern const char kEnableIOSHandoffToOtherDevices[];
extern const char kEnableSpotlightActions[]; extern const char kEnableSpotlightActions[];
extern const char kEnableThirdPartyKeyboardWorkaround[]; extern const char kEnableThirdPartyKeyboardWorkaround[];
extern const char kInstallManagedBookmarksHandler[];
extern const char kInstallURLBlocklistHandlers[]; extern const char kInstallURLBlocklistHandlers[];
extern const char kUserAgent[]; extern const char kUserAgent[];
......
...@@ -126,12 +126,9 @@ std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildPolicyHandlerList( ...@@ -126,12 +126,9 @@ std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildPolicyHandlerList(
handlers->AddHandler(std::make_unique<policy::DefaultSearchPolicyHandler>()); handlers->AddHandler(std::make_unique<policy::DefaultSearchPolicyHandler>());
handlers->AddHandler( handlers->AddHandler(
std::make_unique<safe_browsing::SafeBrowsingPolicyHandler>()); std::make_unique<safe_browsing::SafeBrowsingPolicyHandler>());
if (ShouldInstallManagedBookmarksPolicyHandler()) {
handlers->AddHandler( handlers->AddHandler(
std::make_unique<bookmarks::ManagedBookmarksPolicyHandler>( std::make_unique<bookmarks::ManagedBookmarksPolicyHandler>(
chrome_schema)); chrome_schema));
}
if (ShouldInstallURLBlocklistPolicyHandlers()) { if (ShouldInstallURLBlocklistPolicyHandlers()) {
handlers->AddHandler(std::make_unique<policy::URLBlocklistPolicyHandler>( handlers->AddHandler(std::make_unique<policy::URLBlocklistPolicyHandler>(
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
#include "ios/web/common/features.h" #include "ios/web/common/features.h"
const base::Feature kEditBookmarksIOS{"EditBookmarksIOS", const base::Feature kEditBookmarksIOS{"EditBookmarksIOS",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kManagedBookmarksIOS{"ManagedBookmarksIOS", const base::Feature kManagedBookmarksIOS{"ManagedBookmarksIOS",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kEnableIncognitoModeAvailabilityIOS{ const base::Feature kEnableIncognitoModeAvailabilityIOS{
"EnableIncognitoModeAvailabilityIOS", base::FEATURE_DISABLED_BY_DEFAULT}; "EnableIncognitoModeAvailabilityIOS", base::FEATURE_DISABLED_BY_DEFAULT};
...@@ -59,13 +59,8 @@ bool ShouldInstallEnterprisePolicyHandlers() { ...@@ -59,13 +59,8 @@ bool ShouldInstallEnterprisePolicyHandlers() {
return IsEnterprisePolicyEnabled(); return IsEnterprisePolicyEnabled();
} }
bool ShouldInstallManagedBookmarksPolicyHandler() {
return HasSwitch(switches::kInstallManagedBookmarksHandler);
}
bool IsManagedBookmarksEnabled() { bool IsManagedBookmarksEnabled() {
return ShouldInstallManagedBookmarksPolicyHandler() && return base::FeatureList::IsEnabled(kManagedBookmarksIOS);
base::FeatureList::IsEnabled(kManagedBookmarksIOS);
} }
bool ShouldInstallURLBlocklistPolicyHandlers() { bool ShouldInstallURLBlocklistPolicyHandlers() {
......
...@@ -38,10 +38,6 @@ AppLaunchConfiguration GenerateAppLaunchConfiguration(std::string policy_data) { ...@@ -38,10 +38,6 @@ AppLaunchConfiguration GenerateAppLaunchConfiguration(std::string policy_data) {
AppLaunchConfiguration config; AppLaunchConfiguration config;
config.additional_args.push_back(std::string("--") + config.additional_args.push_back(std::string("--") +
switches::kEnableEnterprisePolicy); switches::kEnableEnterprisePolicy);
config.additional_args.push_back(std::string("--") +
switches::kInstallManagedBookmarksHandler);
config.additional_args.push_back(
std::string("--enable-features=ManagedBookmarksIOS"));
// Remove whitespace from the policy data, because the XML parser does not // Remove whitespace from the policy data, because the XML parser does not
// tolerate newlines. // tolerate newlines.
......
...@@ -409,6 +409,7 @@ TEST_F(PopupMenuMediatorTest, TestItemsStatusOnNTP) { ...@@ -409,6 +409,7 @@ TEST_F(PopupMenuMediatorTest, TestItemsStatusOnNTP) {
TEST_F(PopupMenuMediatorTest, TestReadLaterDisabled) { TEST_F(PopupMenuMediatorTest, TestReadLaterDisabled) {
const GURL kUrl("https://chromium.test"); const GURL kUrl("https://chromium.test");
web_state_->SetCurrentURL(kUrl); web_state_->SetCurrentURL(kUrl);
CreatePrefs();
CreateMediator(PopupMenuTypeToolsMenu, /*is_incognito=*/NO, CreateMediator(PopupMenuTypeToolsMenu, /*is_incognito=*/NO,
/*trigger_incognito_hint=*/NO); /*trigger_incognito_hint=*/NO);
mediator_.webStateList = web_state_list_.get(); mediator_.webStateList = web_state_list_.get();
...@@ -416,6 +417,7 @@ TEST_F(PopupMenuMediatorTest, TestReadLaterDisabled) { ...@@ -416,6 +417,7 @@ TEST_F(PopupMenuMediatorTest, TestReadLaterDisabled) {
browser_.get(), OverlayModality::kWebContentArea); browser_.get(), OverlayModality::kWebContentArea);
FakePopupMenuConsumer* consumer = [[FakePopupMenuConsumer alloc] init]; FakePopupMenuConsumer* consumer = [[FakePopupMenuConsumer alloc] init];
mediator_.popupMenu = consumer; mediator_.popupMenu = consumer;
mediator_.prefService = prefs_.get();
SetUpActiveWebState(); SetUpActiveWebState();
ASSERT_TRUE(HasItem(consumer, kToolsMenuReadLater, /*enabled=*/YES)); ASSERT_TRUE(HasItem(consumer, kToolsMenuReadLater, /*enabled=*/YES));
...@@ -512,12 +514,14 @@ TEST_F(PopupMenuMediatorTest, TestBookmarksToolsMenuButtons) { ...@@ -512,12 +514,14 @@ TEST_F(PopupMenuMediatorTest, TestBookmarksToolsMenuButtons) {
web_state_->SetCurrentURL(url); web_state_->SetCurrentURL(url);
CreateMediator(PopupMenuTypeToolsMenu, /*is_incognito=*/NO, CreateMediator(PopupMenuTypeToolsMenu, /*is_incognito=*/NO,
/*trigger_incognito_hint=*/NO); /*trigger_incognito_hint=*/NO);
CreatePrefs();
SetUpBookmarks(); SetUpBookmarks();
bookmarks::AddIfNotBookmarked(bookmark_model_, url, bookmarks::AddIfNotBookmarked(bookmark_model_, url,
base::SysNSStringToUTF16(@"Test bookmark")); base::SysNSStringToUTF16(@"Test bookmark"));
mediator_.webStateList = web_state_list_.get(); mediator_.webStateList = web_state_list_.get();
FakePopupMenuConsumer* consumer = [[FakePopupMenuConsumer alloc] init]; FakePopupMenuConsumer* consumer = [[FakePopupMenuConsumer alloc] init];
mediator_.popupMenu = consumer; mediator_.popupMenu = consumer;
mediator_.prefService = prefs_.get();
EXPECT_TRUE(HasItem(consumer, kToolsMenuAddToBookmarks, /*enabled=*/YES)); EXPECT_TRUE(HasItem(consumer, kToolsMenuAddToBookmarks, /*enabled=*/YES));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment