Commit 42f307ce authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

split view: Parameterize many tests by MultiDisplayOverviewAndSplitView

As a starting point for test coverage of multi-display overview and
split view, the most important existing test suites involving split view
mode shall be endowed with a parameter that determines whether to enable
the feature flag, to test that old split view functionality still works.

Bug: 970013
Change-Id: I971382e68cac7e423442db401e078b85c85f1953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825730
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700453}
parent 4e8ed8f8
...@@ -2268,6 +2268,8 @@ static_library("test_support") { ...@@ -2268,6 +2268,8 @@ static_library("test_support") {
"wm/cursor_manager_test_api.h", "wm/cursor_manager_test_api.h",
"wm/lock_state_controller_test_api.cc", "wm/lock_state_controller_test_api.cc",
"wm/lock_state_controller_test_api.h", "wm/lock_state_controller_test_api.h",
"wm/splitview/multi_display_overview_and_split_view_test.cc",
"wm/splitview/multi_display_overview_and_split_view_test.h",
"wm/splitview/split_view_highlight_view_test_api.cc", "wm/splitview/split_view_highlight_view_test_api.cc",
"wm/splitview/split_view_highlight_view_test_api.h", "wm/splitview/split_view_highlight_view_test_api.h",
"wm/tablet_mode/tablet_mode_controller_test_api.cc", "wm/tablet_mode/tablet_mode_controller_test_api.cc",
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/wm/splitview/multi_display_overview_and_split_view_test.h"
#include "ash/public/cpp/ash_features.h"
namespace ash {
MultiDisplayOverviewAndSplitViewTest::MultiDisplayOverviewAndSplitViewTest() =
default;
MultiDisplayOverviewAndSplitViewTest::~MultiDisplayOverviewAndSplitViewTest() =
default;
void MultiDisplayOverviewAndSplitViewTest::SetUp() {
if (GetParam()) {
scoped_feature_list_.InitAndEnableFeature(
ash::features::kMultiDisplayOverviewAndSplitView);
}
AshTestBase::SetUp();
}
void MultiDisplayOverviewAndSplitViewTest::TearDown() {
AshTestBase::TearDown();
scoped_feature_list_.Reset();
}
} // namespace ash
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WM_SPLITVIEW_MULTI_DISPLAY_OVERVIEW_AND_SPLIT_VIEW_TEST_H_
#define ASH_WM_SPLITVIEW_MULTI_DISPLAY_OVERVIEW_AND_SPLIT_VIEW_TEST_H_
#include "ash/ash_export.h"
#include "ash/test/ash_test_base.h"
#include "base/macros.h"
#include "base/test/scoped_feature_list.h"
namespace ash {
// Test with a parameter that determines whether to enable the
// |ash::features::kMultiDisplayOverviewAndSplitView| feature flag, to ensure
// that old overview and split view functionality still works.
class ASH_EXPORT MultiDisplayOverviewAndSplitViewTest
: public AshTestBase,
public testing::WithParamInterface<bool> {
public:
MultiDisplayOverviewAndSplitViewTest();
~MultiDisplayOverviewAndSplitViewTest() override;
// AshTestBase:
void SetUp() override;
void TearDown() override;
private:
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(MultiDisplayOverviewAndSplitViewTest);
};
} // namespace ash
#endif // ASH_WM_SPLITVIEW_MULTI_DISPLAY_OVERVIEW_AND_SPLIT_VIEW_TEST_H_
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