Commit d54b0767 authored by Bret Sepulveda's avatar Bret Sepulveda Committed by Commit Bot

Fix PageInfoBubbleViewTest Harmony tests when Refresh is on.

SetPermissionInfo and SetPermissionInfoForUsbGuard were checking whether
Harmony was enabled by checking the feature flag instead of calling
MaterialDesignController::IsSecondaryUiMaterial. The latter will return
true under Refresh when the former does not.

Also deletes some obsolete Mac-only code.

Bug: 846410
Change-Id: I9cdf5ec0dee8fb2fcc519fa3c09702014d7342fe
Reviewed-on: https://chromium-review.googlesource.com/1103583
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568138}
parent c5c6320f
...@@ -248,13 +248,8 @@ TEST_F(PageInfoBubbleViewTest, SetPermissionInfo) { ...@@ -248,13 +248,8 @@ TEST_F(PageInfoBubbleViewTest, SetPermissionInfo) {
// practice. In practice, every setting in PermissionSelectorRow starts off // practice. In practice, every setting in PermissionSelectorRow starts off
// "set", so there is always one option checked in the resulting MenuModel. // "set", so there is always one option checked in the resulting MenuModel.
// This test creates settings that are left at their defaults, leading to zero // This test creates settings that are left at their defaults, leading to zero
// checked options, and checks that the text on the MenuButtons is right. On // checked options, and checks that the text on the MenuButtons is right.
// Mac, the behavior matches, but only when SecondaryUiMd is enabled. const bool is_md = ui::MaterialDesignController::IsSecondaryUiMaterial();
const bool is_md = base::FeatureList::IsEnabled(features::kSecondaryUiMd);
#if defined(OS_MACOSX)
if (!is_md)
return;
#endif
PermissionInfoList list(1); PermissionInfoList list(1);
list.back().type = CONTENT_SETTINGS_TYPE_GEOLOCATION; list.back().type = CONTENT_SETTINGS_TYPE_GEOLOCATION;
...@@ -367,13 +362,8 @@ TEST_F(PageInfoBubbleViewTest, SetPermissionInfoForUsbGuard) { ...@@ -367,13 +362,8 @@ TEST_F(PageInfoBubbleViewTest, SetPermissionInfoForUsbGuard) {
// practice. In practice, every setting in PermissionSelectorRow starts off // practice. In practice, every setting in PermissionSelectorRow starts off
// "set", so there is always one option checked in the resulting MenuModel. // "set", so there is always one option checked in the resulting MenuModel.
// This test creates settings that are left at their defaults, leading to zero // This test creates settings that are left at their defaults, leading to zero
// checked options, and checks that the text on the MenuButtons is right. On // checked options, and checks that the text on the MenuButtons is right.
// Mac, the behavior matches, but only when SecondaryUiMd is enabled. const bool is_md = ui::MaterialDesignController::IsSecondaryUiMaterial();
const bool is_md = base::FeatureList::IsEnabled(features::kSecondaryUiMd);
#if defined(OS_MACOSX)
if (!is_md)
return;
#endif
PermissionInfoList list(1); PermissionInfoList list(1);
list.back().type = CONTENT_SETTINGS_TYPE_USB_GUARD; list.back().type = CONTENT_SETTINGS_TYPE_USB_GUARD;
......
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