Commit bde80fe4 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Turn ScalableAppList on by default

Test fixes:
AppListPresenterDelegateZeroStateTest.ClickSearchBoxInTabletMode
*   test was incorrectly calculating search box bounds in midst of
    an animation - fixed by making animations non zero length after
    initial test state was set up

AppListModelFolderTest.FolderItem
*   tests behavior expected when the feature is off

AppListViewTest.AppsGridViewVisibilityOnReopening
*   with the new feature, apps grid is shown faded in the background
    on search results page - updated the expectation

BUG=976947,976954

Change-Id: Ia571dc6026b5d0c0dd512e6dc69e2d22492343ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838928
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702943}
parent 7051e6d4
...@@ -330,15 +330,16 @@ TEST_F(AppListPresenterDelegateZeroStateTest, ...@@ -330,15 +330,16 @@ TEST_F(AppListPresenterDelegateZeroStateTest,
// Verifies that tapping on the search box in tablet mode with animation and // Verifies that tapping on the search box in tablet mode with animation and
// zero state enabled should not bring Chrome crash (https://crbug.com/958267). // zero state enabled should not bring Chrome crash (https://crbug.com/958267).
TEST_F(AppListPresenterDelegateZeroStateTest, ClickSearchBoxInTabletMode) { TEST_F(AppListPresenterDelegateZeroStateTest, ClickSearchBoxInTabletMode) {
EnableTabletMode(true);
GetAppListTestHelper()->ShowAndRunLoop(GetPrimaryDisplayId());
GetAppListTestHelper()->CheckState(AppListViewState::kFullscreenAllApps);
// Necessary for AppListView::StateAnimationMetricsReporter::Report being // Necessary for AppListView::StateAnimationMetricsReporter::Report being
// called when animation ends. // called when animation ends.
ui::ScopedAnimationDurationScaleMode non_zero_duration_mode( ui::ScopedAnimationDurationScaleMode non_zero_duration_mode(
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION); ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
app_list::AppListView::SetShortAnimationForTesting(false); app_list::AppListView::SetShortAnimationForTesting(false);
EnableTabletMode(true);
GetAppListTestHelper()->ShowAndRunLoop(GetPrimaryDisplayId());
GetAppListTestHelper()->CheckState(AppListViewState::kFullscreenAllApps);
ui::test::EventGenerator* generator = GetEventGenerator(); ui::test::EventGenerator* generator = GetEventGenerator();
// Gesture tap on the search box. // Gesture tap on the search box.
......
...@@ -229,6 +229,9 @@ TEST_F(AppListModelTest, AppOrder) { ...@@ -229,6 +229,9 @@ TEST_F(AppListModelTest, AppOrder) {
using AppListModelFolderTest = AppListModelTest; using AppListModelFolderTest = AppListModelTest;
TEST_F(AppListModelFolderTest, FolderItem) { TEST_F(AppListModelFolderTest, FolderItem) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitWithFeatures({},
{app_list_features::kScalableAppList});
AppListFolderItem* folder = new AppListFolderItem("folder1"); AppListFolderItem* folder = new AppListFolderItem("folder1");
const size_t num_folder_apps = 8; const size_t num_folder_apps = 8;
const size_t num_observed_apps = 4; const size_t num_observed_apps = 4;
......
...@@ -2154,7 +2154,8 @@ TEST_F(AppListViewTest, AppsGridViewVisibilityOnReopening) { ...@@ -2154,7 +2154,8 @@ TEST_F(AppListViewTest, AppsGridViewVisibilityOnReopening) {
view_->SetState(ash::AppListViewState::kFullscreenSearch); view_->SetState(ash::AppListViewState::kFullscreenSearch);
SetAppListState(ash::AppListState::kStateSearchResults); SetAppListState(ash::AppListState::kStateSearchResults);
EXPECT_FALSE(IsViewVisibleOnScreen(apps_grid_view())); EXPECT_EQ(app_list_features::IsScalableAppListEnabled(),
IsViewVisibleOnScreen(apps_grid_view()));
// Close the app-list and re-show to fullscreen all apps. // Close the app-list and re-show to fullscreen all apps.
view_->SetState(ash::AppListViewState::kClosed); view_->SetState(ash::AppListViewState::kClosed);
......
...@@ -44,7 +44,7 @@ const base::Feature kEnableSearchBoxSelection{"EnableSearchBoxSelection", ...@@ -44,7 +44,7 @@ const base::Feature kEnableSearchBoxSelection{"EnableSearchBoxSelection",
const base::Feature kEnableAggregatedMlAppRanking{ const base::Feature kEnableAggregatedMlAppRanking{
"EnableAggregatedMlAppRanking", base::FEATURE_DISABLED_BY_DEFAULT}; "EnableAggregatedMlAppRanking", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kScalableAppList{"ScalableAppList", const base::Feature kScalableAppList{"ScalableAppList",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kEnableFuzzyAppSearch{"EnableFuzzyAppSearch", const base::Feature kEnableFuzzyAppSearch{"EnableFuzzyAppSearch",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
......
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