Commit 62910715 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev Committed by Commit Bot

Make ScrollableShelfViewTest pass when shelf-scrollable is disabled

Force-enable kShelfScrollable feature in ScrollableShelfViewTest
to make sure they do not regress regardless of the default state
of this feature.

Bug: 1015426
Test: ash_unittests with and without --shelf-scrollable flag
Change-Id: I2c07aaefaff2ba9785884e1959ebdd2a72a3398b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866871
Commit-Queue: Vladislav Kaznacheev <kaznacheev@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Auto-Submit: Vladislav Kaznacheev <kaznacheev@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706939}
parent 059c01ee
......@@ -10,7 +10,8 @@
#include "ash/shelf/shelf_view_test_api.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/test/ash_test_base.h"
#include "chromeos/constants/chromeos_switches.h"
#include "base/test/scoped_feature_list.h"
#include "chromeos/constants/chromeos_features.h"
#include "ui/display/manager/display_manager.h"
namespace ash {
......@@ -40,6 +41,9 @@ class ScrollableShelfViewTest : public AshTestBase {
~ScrollableShelfViewTest() override = default;
void SetUp() override {
scoped_feature_list_.InitWithFeatures(
{chromeos::features::kShelfScrollable}, {});
AshTestBase::SetUp();
scrollable_shelf_view_ = GetPrimaryShelf()
->shelf_widget()
......@@ -99,6 +103,7 @@ class ScrollableShelfViewTest : public AshTestBase {
EXPECT_TRUE(visible_space_in_screen.Contains(first_tappable_icon_bounds));
}
base::test::ScopedFeatureList scoped_feature_list_;
ScrollableShelfView* scrollable_shelf_view_ = nullptr;
ShelfView* shelf_view_ = nullptr;
std::unique_ptr<ShelfViewTestAPI> test_api_;
......
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