| Index: ui/app_list/views/app_list_view_unittest.cc
|
| diff --git a/ui/app_list/views/app_list_view_unittest.cc b/ui/app_list/views/app_list_view_unittest.cc
|
| index 5f2c8ac8413ff015e75d97a93b3af767ede52415..242bfa4e22d649af49d2022e39b0575ee7401aa2 100644
|
| --- a/ui/app_list/views/app_list_view_unittest.cc
|
| +++ b/ui/app_list/views/app_list_view_unittest.cc
|
| @@ -48,14 +48,6 @@ namespace test {
|
|
|
| namespace {
|
|
|
| -enum TestType {
|
| - TEST_TYPE_START = 0,
|
| - NORMAL = TEST_TYPE_START,
|
| - LANDSCAPE,
|
| - EXPERIMENTAL,
|
| - TEST_TYPE_END,
|
| -};
|
| -
|
| template <class T>
|
| size_t GetVisibleViews(const std::vector<T*>& tiles) {
|
| size_t count = 0;
|
| @@ -92,7 +84,7 @@ class TestStartPageSearchResult : public TestSearchResult {
|
| // root window or a desktop window tree host.
|
| class AppListViewTestContext {
|
| public:
|
| - AppListViewTestContext(int test_type, gfx::NativeView parent);
|
| + explicit AppListViewTestContext(gfx::NativeView parent);
|
| ~AppListViewTestContext();
|
|
|
| // Test displaying the app list and performs a standard set of checks on its
|
| @@ -132,11 +124,6 @@ class AppListViewTestContext {
|
| run_loop_->Quit();
|
| }
|
|
|
| - // Whether the experimental "landscape" app launcher UI is being tested.
|
| - bool is_landscape() const {
|
| - return test_type_ == LANDSCAPE || test_type_ == EXPERIMENTAL;
|
| - }
|
| -
|
| private:
|
| // Switches the launcher to |state| and lays out to ensure all launcher pages
|
| // are in the correct position. Checks that the state is where it should be
|
| @@ -159,7 +146,6 @@ class AppListViewTestContext {
|
| // Gets the PaginationModel owned by |view_|.
|
| PaginationModel* GetPaginationModel();
|
|
|
| - const TestType test_type_;
|
| std::unique_ptr<base::RunLoop> run_loop_;
|
| app_list::AppListView* view_; // Owned by native widget.
|
| std::unique_ptr<app_list::test::AppListTestViewDelegate> delegate_;
|
| @@ -189,29 +175,7 @@ class UnitTestViewDelegate : public app_list::test::AppListTestViewDelegate {
|
| DISALLOW_COPY_AND_ASSIGN(UnitTestViewDelegate);
|
| };
|
|
|
| -AppListViewTestContext::AppListViewTestContext(int test_type,
|
| - gfx::NativeView parent)
|
| - : test_type_(static_cast<TestType>(test_type)) {
|
| - switch (test_type_) {
|
| - case NORMAL:
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kDisableExperimentalAppList);
|
| - break;
|
| - case LANDSCAPE:
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kDisableExperimentalAppList);
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kEnableCenteredAppList);
|
| - break;
|
| - case EXPERIMENTAL:
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kEnableExperimentalAppList);
|
| - break;
|
| - default:
|
| - NOTREACHED();
|
| - break;
|
| - }
|
| -
|
| +AppListViewTestContext::AppListViewTestContext(gfx::NativeView parent) {
|
| delegate_.reset(new UnitTestViewDelegate(this));
|
| view_ = new app_list::AppListView(delegate_.get());
|
|
|
| @@ -304,28 +268,9 @@ void AppListViewTestContext::RunDisplayTest() {
|
| // Explicitly enforce the exact dimensions of the app list. Feel free to
|
| // change these if you need to (they are just here to prevent against
|
| // accidental changes to the window size).
|
| - switch (test_type_) {
|
| - case NORMAL:
|
| - EXPECT_EQ("400x500", view_->bounds().size().ToString());
|
| - break;
|
| - case LANDSCAPE:
|
| - // NOTE: Height should not exceed 402, because otherwise there might not
|
| - // be enough space to accomodate the virtual keyboard. (LANDSCAPE mode is
|
| - // enabled by default when the virtual keyboard is enabled.)
|
| - EXPECT_EQ("576x402", view_->bounds().size().ToString());
|
| - break;
|
| - case EXPERIMENTAL:
|
| - EXPECT_EQ("768x570", view_->bounds().size().ToString());
|
| - break;
|
| - default:
|
| - NOTREACHED();
|
| - break;
|
| - }
|
| + EXPECT_EQ("768x570", view_->bounds().size().ToString());
|
|
|
| - if (is_landscape())
|
| - EXPECT_EQ(2, GetPaginationModel()->total_pages());
|
| - else
|
| - EXPECT_EQ(3, GetPaginationModel()->total_pages());
|
| + EXPECT_EQ(2, GetPaginationModel()->total_pages());
|
| EXPECT_EQ(0, GetPaginationModel()->selected_page());
|
|
|
| // Checks on the main view.
|
| @@ -333,9 +278,7 @@ void AppListViewTestContext::RunDisplayTest() {
|
| EXPECT_NO_FATAL_FAILURE(CheckView(main_view));
|
| EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view()));
|
|
|
| - AppListModel::State expected = test_type_ == EXPERIMENTAL
|
| - ? AppListModel::STATE_START
|
| - : AppListModel::STATE_APPS;
|
| + AppListModel::State expected = AppListModel::STATE_START;
|
| EXPECT_TRUE(main_view->contents_view()->IsStateActive(expected));
|
| EXPECT_EQ(expected, delegate_->GetTestModel()->state());
|
|
|
| @@ -387,11 +330,6 @@ void AppListViewTestContext::RunReshowWithOpenFolderTest() {
|
| }
|
|
|
| void AppListViewTestContext::RunBackTest() {
|
| - if (test_type_ != EXPERIMENTAL) {
|
| - Close();
|
| - return;
|
| - }
|
| -
|
| EXPECT_FALSE(view_->GetWidget()->IsVisible());
|
| EXPECT_EQ(-1, GetPaginationModel()->total_pages());
|
|
|
| @@ -457,83 +395,76 @@ void AppListViewTestContext::RunStartPageTest() {
|
| // Checks on the main view.
|
| EXPECT_NO_FATAL_FAILURE(CheckView(main_view));
|
| EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view()));
|
| - if (test_type_ == EXPERIMENTAL) {
|
| - EXPECT_NO_FATAL_FAILURE(CheckView(start_page_view));
|
| -
|
| - // Show the start page view.
|
| - EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| - gfx::Size view_size(view_->GetPreferredSize());
|
| -
|
| - // The "All apps" button should have its "parent background color" set
|
| - // to the tiles container's background color.
|
| - TileItemView* all_apps_button = start_page_view->all_apps_button();
|
| - EXPECT_TRUE(all_apps_button->visible());
|
| - EXPECT_EQ(kLabelBackgroundColor,
|
| - all_apps_button->parent_background_color());
|
| -
|
| - // Simulate clicking the "All apps" button. Check that we navigate to the
|
| - // apps grid view.
|
| - SimulateClick(all_apps_button);
|
| - main_view->contents_view()->Layout();
|
| - EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS));
|
| -
|
| - // Hiding and showing the search box should not affect the app list's
|
| - // preferred size. This is a regression test for http://crbug.com/386912.
|
| - EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString());
|
| -
|
| - // Check tiles hide and show on deletion and addition.
|
| - EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| - model->results()->Add(new TestStartPageSearchResult());
|
| - start_page_view->UpdateForTesting();
|
| - EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
| - model->results()->DeleteAll();
|
| - start_page_view->UpdateForTesting();
|
| - EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views()));
|
| -
|
| - // Tiles should not update when the start page is not active but should be
|
| - // correct once the start page is shown.
|
| - EXPECT_TRUE(SetAppListState(AppListModel::STATE_APPS));
|
| - model->results()->Add(new TestStartPageSearchResult());
|
| - start_page_view->UpdateForTesting();
|
| - EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views()));
|
| - EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| - EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
| - } else {
|
| - EXPECT_EQ(NULL, start_page_view);
|
| - }
|
| + EXPECT_NO_FATAL_FAILURE(CheckView(start_page_view));
|
| +
|
| + // Show the start page view.
|
| + EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| + gfx::Size view_size(view_->GetPreferredSize());
|
| +
|
| + // The "All apps" button should have its "parent background color" set
|
| + // to the tiles container's background color.
|
| + TileItemView* all_apps_button = start_page_view->all_apps_button();
|
| + EXPECT_TRUE(all_apps_button->visible());
|
| + EXPECT_EQ(kLabelBackgroundColor, all_apps_button->parent_background_color());
|
| +
|
| + // Simulate clicking the "All apps" button. Check that we navigate to the
|
| + // apps grid view.
|
| + SimulateClick(all_apps_button);
|
| + main_view->contents_view()->Layout();
|
| + EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS));
|
| +
|
| + // Hiding and showing the search box should not affect the app list's
|
| + // preferred size. This is a regression test for http://crbug.com/386912.
|
| + EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString());
|
| +
|
| + // Check tiles hide and show on deletion and addition.
|
| + EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| + model->results()->Add(new TestStartPageSearchResult());
|
| + start_page_view->UpdateForTesting();
|
| + EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
| + model->results()->DeleteAll();
|
| + start_page_view->UpdateForTesting();
|
| + EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views()));
|
| +
|
| + // Tiles should not update when the start page is not active but should be
|
| + // correct once the start page is shown.
|
| + EXPECT_TRUE(SetAppListState(AppListModel::STATE_APPS));
|
| + model->results()->Add(new TestStartPageSearchResult());
|
| + start_page_view->UpdateForTesting();
|
| + EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views()));
|
| + EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| + EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
|
|
| Close();
|
| }
|
|
|
| void AppListViewTestContext::RunPageSwitchingAnimationTest() {
|
| - if (test_type_ == EXPERIMENTAL) {
|
| - Show();
|
| + Show();
|
|
|
| - AppListMainView* main_view = view_->app_list_main_view();
|
| - // Checks on the main view.
|
| - EXPECT_NO_FATAL_FAILURE(CheckView(main_view));
|
| - EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view()));
|
| + AppListMainView* main_view = view_->app_list_main_view();
|
| + // Checks on the main view.
|
| + EXPECT_NO_FATAL_FAILURE(CheckView(main_view));
|
| + EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view()));
|
|
|
| - ContentsView* contents_view = main_view->contents_view();
|
| + ContentsView* contents_view = main_view->contents_view();
|
|
|
| - contents_view->SetActiveState(AppListModel::STATE_START);
|
| - contents_view->Layout();
|
| + contents_view->SetActiveState(AppListModel::STATE_START);
|
| + contents_view->Layout();
|
|
|
| - IsStateShown(AppListModel::STATE_START);
|
| + IsStateShown(AppListModel::STATE_START);
|
|
|
| - // Change pages. View should not have moved without Layout().
|
| - contents_view->SetActiveState(AppListModel::STATE_SEARCH_RESULTS);
|
| - IsStateShown(AppListModel::STATE_START);
|
| + // Change pages. View should not have moved without Layout().
|
| + contents_view->SetActiveState(AppListModel::STATE_SEARCH_RESULTS);
|
| + IsStateShown(AppListModel::STATE_START);
|
|
|
| - // Change to a third page. This queues up the second animation behind the
|
| - // first.
|
| - contents_view->SetActiveState(AppListModel::STATE_APPS);
|
| - IsStateShown(AppListModel::STATE_START);
|
| + // Change to a third page. This queues up the second animation behind the
|
| + // first.
|
| + contents_view->SetActiveState(AppListModel::STATE_APPS);
|
| + IsStateShown(AppListModel::STATE_START);
|
|
|
| - // Call Layout(). Should jump to the third page.
|
| - contents_view->Layout();
|
| - IsStateShown(AppListModel::STATE_APPS);
|
| - }
|
| + // Call Layout(). Should jump to the third page.
|
| + contents_view->Layout();
|
| + IsStateShown(AppListModel::STATE_APPS);
|
|
|
| Close();
|
| }
|
| @@ -545,10 +476,7 @@ void AppListViewTestContext::RunProfileChangeTest() {
|
|
|
| Show();
|
|
|
| - if (is_landscape())
|
| - EXPECT_EQ(2, GetPaginationModel()->total_pages());
|
| - else
|
| - EXPECT_EQ(3, GetPaginationModel()->total_pages());
|
| + EXPECT_EQ(2, GetPaginationModel()->total_pages());
|
|
|
| // Change the profile. The original model needs to be kept alive for
|
| // observers to unregister themselves.
|
| @@ -562,25 +490,18 @@ void AppListViewTestContext::RunProfileChangeTest() {
|
|
|
| StartPageView* start_page_view =
|
| view_->app_list_main_view()->contents_view()->start_page_view();
|
| - if (test_type_ == EXPERIMENTAL)
|
| - EXPECT_NO_FATAL_FAILURE(CheckView(start_page_view));
|
| - else
|
| - EXPECT_EQ(NULL, start_page_view);
|
| + EXPECT_NO_FATAL_FAILURE(CheckView(start_page_view));
|
|
|
| // New model updates should be processed by the start page view.
|
| delegate_->GetTestModel()->results()->Add(new TestStartPageSearchResult());
|
| - if (test_type_ == EXPERIMENTAL) {
|
| - start_page_view->UpdateForTesting();
|
| - EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
| - }
|
| + start_page_view->UpdateForTesting();
|
| + EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
|
|
| // Old model updates should be ignored.
|
| original_test_model->results()->Add(new TestStartPageSearchResult());
|
| original_test_model->results()->Add(new TestStartPageSearchResult());
|
| - if (test_type_ == EXPERIMENTAL) {
|
| - start_page_view->UpdateForTesting();
|
| - EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
| - }
|
| + start_page_view->UpdateForTesting();
|
| + EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
|
|
|
| Close();
|
| }
|
| @@ -611,43 +532,37 @@ void AppListViewTestContext::RunSearchResultsTest() {
|
| // Check that we return to the page that we were on before the search.
|
| EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS));
|
|
|
| - if (test_type_ == EXPERIMENTAL) {
|
| - // Check that typing into the search box triggers the search page.
|
| - EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| - view_->Layout();
|
| - EXPECT_TRUE(IsStateShown(AppListModel::STATE_START));
|
| -
|
| - base::string16 search_text = base::UTF8ToUTF16("test");
|
| - main_view->search_box_view()->search_box()->SetText(base::string16());
|
| - main_view->search_box_view()->search_box()->InsertText(search_text);
|
| - // Check that the current search is using |search_text|.
|
| - EXPECT_EQ(search_text, delegate_->GetTestModel()->search_box()->text());
|
| - EXPECT_EQ(search_text, main_view->search_box_view()->search_box()->text());
|
| - contents_view->Layout();
|
| - EXPECT_TRUE(
|
| - contents_view->IsStateActive(AppListModel::STATE_SEARCH_RESULTS));
|
| - EXPECT_TRUE(
|
| - CheckSearchBoxWidget(contents_view->GetDefaultSearchBoxBounds()));
|
| -
|
| - // Check that typing into the search box triggers the search page.
|
| - EXPECT_TRUE(SetAppListState(AppListModel::STATE_APPS));
|
| - contents_view->Layout();
|
| - EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS));
|
| - EXPECT_TRUE(
|
| - CheckSearchBoxWidget(contents_view->GetDefaultSearchBoxBounds()));
|
| -
|
| - base::string16 new_search_text = base::UTF8ToUTF16("apple");
|
| - main_view->search_box_view()->search_box()->SetText(base::string16());
|
| - main_view->search_box_view()->search_box()->InsertText(new_search_text);
|
| - // Check that the current search is using |new_search_text|.
|
| - EXPECT_EQ(new_search_text, delegate_->GetTestModel()->search_box()->text());
|
| - EXPECT_EQ(new_search_text,
|
| - main_view->search_box_view()->search_box()->text());
|
| - contents_view->Layout();
|
| - EXPECT_TRUE(IsStateShown(AppListModel::STATE_SEARCH_RESULTS));
|
| - EXPECT_TRUE(
|
| - CheckSearchBoxWidget(contents_view->GetDefaultSearchBoxBounds()));
|
| - }
|
| + // Check that typing into the search box triggers the search page.
|
| + EXPECT_TRUE(SetAppListState(AppListModel::STATE_START));
|
| + view_->Layout();
|
| + EXPECT_TRUE(IsStateShown(AppListModel::STATE_START));
|
| +
|
| + base::string16 search_text = base::UTF8ToUTF16("test");
|
| + main_view->search_box_view()->search_box()->SetText(base::string16());
|
| + main_view->search_box_view()->search_box()->InsertText(search_text);
|
| + // Check that the current search is using |search_text|.
|
| + EXPECT_EQ(search_text, delegate_->GetTestModel()->search_box()->text());
|
| + EXPECT_EQ(search_text, main_view->search_box_view()->search_box()->text());
|
| + contents_view->Layout();
|
| + EXPECT_TRUE(contents_view->IsStateActive(AppListModel::STATE_SEARCH_RESULTS));
|
| + EXPECT_TRUE(CheckSearchBoxWidget(contents_view->GetDefaultSearchBoxBounds()));
|
| +
|
| + // Check that typing into the search box triggers the search page.
|
| + EXPECT_TRUE(SetAppListState(AppListModel::STATE_APPS));
|
| + contents_view->Layout();
|
| + EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS));
|
| + EXPECT_TRUE(CheckSearchBoxWidget(contents_view->GetDefaultSearchBoxBounds()));
|
| +
|
| + base::string16 new_search_text = base::UTF8ToUTF16("apple");
|
| + main_view->search_box_view()->search_box()->SetText(base::string16());
|
| + main_view->search_box_view()->search_box()->InsertText(new_search_text);
|
| + // Check that the current search is using |new_search_text|.
|
| + EXPECT_EQ(new_search_text, delegate_->GetTestModel()->search_box()->text());
|
| + EXPECT_EQ(new_search_text,
|
| + main_view->search_box_view()->search_box()->text());
|
| + contents_view->Layout();
|
| + EXPECT_TRUE(IsStateShown(AppListModel::STATE_SEARCH_RESULTS));
|
| + EXPECT_TRUE(CheckSearchBoxWidget(contents_view->GetDefaultSearchBoxBounds()));
|
|
|
| Close();
|
| }
|
| @@ -671,11 +586,10 @@ void AppListViewTestContext::RunAppListOverlayTest() {
|
| Close();
|
| }
|
|
|
| -class AppListViewTestAura : public views::ViewsTestBase,
|
| - public ::testing::WithParamInterface<int> {
|
| +class AppListViewTestAura : public views::ViewsTestBase {
|
| public:
|
| AppListViewTestAura() {}
|
| - virtual ~AppListViewTestAura() {}
|
| + ~AppListViewTestAura() override {}
|
|
|
| // testing::Test overrides:
|
| void SetUp() override {
|
| @@ -690,7 +604,7 @@ class AppListViewTestAura : public views::ViewsTestBase,
|
| container = GetContext();
|
| #endif
|
|
|
| - test_context_.reset(new AppListViewTestContext(GetParam(), container));
|
| + test_context_.reset(new AppListViewTestContext(container));
|
| }
|
|
|
| void TearDown() override {
|
| @@ -705,17 +619,16 @@ class AppListViewTestAura : public views::ViewsTestBase,
|
| DISALLOW_COPY_AND_ASSIGN(AppListViewTestAura);
|
| };
|
|
|
| -class AppListViewTestDesktop : public views::ViewsTestBase,
|
| - public ::testing::WithParamInterface<int> {
|
| +class AppListViewTestDesktop : public views::ViewsTestBase {
|
| public:
|
| AppListViewTestDesktop() {}
|
| - virtual ~AppListViewTestDesktop() {}
|
| + ~AppListViewTestDesktop() override {}
|
|
|
| // testing::Test overrides:
|
| void SetUp() override {
|
| set_views_delegate(base::MakeUnique<AppListViewTestViewsDelegate>(this));
|
| views::ViewsTestBase::SetUp();
|
| - test_context_.reset(new AppListViewTestContext(GetParam(), NULL));
|
| + test_context_.reset(new AppListViewTestContext(NULL));
|
| }
|
|
|
| void TearDown() override {
|
| @@ -771,89 +684,79 @@ void AppListViewTestDesktop::AppListViewTestViewsDelegate::OnBeforeWidgetInit(
|
| } // namespace
|
|
|
| // Tests showing the app list with basic test model in an ash-style root window.
|
| -TEST_P(AppListViewTestAura, Display) {
|
| +TEST_F(AppListViewTestAura, Display) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunDisplayTest());
|
| }
|
|
|
| // Tests showing the app list on the desktop. Note on ChromeOS, this will still
|
| // use the regular root window.
|
| -TEST_P(AppListViewTestDesktop, Display) {
|
| +TEST_F(AppListViewTestDesktop, Display) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunDisplayTest());
|
| }
|
|
|
| // Tests that the main grid view is shown after hiding and reshowing the app
|
| // list with a folder view open. This is a regression test for crbug.com/357058.
|
| -TEST_P(AppListViewTestAura, ReshowWithOpenFolder) {
|
| +TEST_F(AppListViewTestAura, ReshowWithOpenFolder) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunReshowWithOpenFolderTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, ReshowWithOpenFolder) {
|
| +TEST_F(AppListViewTestDesktop, ReshowWithOpenFolder) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunReshowWithOpenFolderTest());
|
| }
|
|
|
| // Tests that the start page view operates correctly.
|
| -TEST_P(AppListViewTestAura, StartPageTest) {
|
| +TEST_F(AppListViewTestAura, StartPageTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunStartPageTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, StartPageTest) {
|
| +TEST_F(AppListViewTestDesktop, StartPageTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunStartPageTest());
|
| }
|
|
|
| // Tests that the start page view operates correctly.
|
| -TEST_P(AppListViewTestAura, PageSwitchingAnimationTest) {
|
| +TEST_F(AppListViewTestAura, PageSwitchingAnimationTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunPageSwitchingAnimationTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, PageSwitchingAnimationTest) {
|
| +TEST_F(AppListViewTestDesktop, PageSwitchingAnimationTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunPageSwitchingAnimationTest());
|
| }
|
|
|
| // Tests that the profile changes operate correctly.
|
| -TEST_P(AppListViewTestAura, ProfileChangeTest) {
|
| +TEST_F(AppListViewTestAura, ProfileChangeTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunProfileChangeTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, ProfileChangeTest) {
|
| +TEST_F(AppListViewTestDesktop, ProfileChangeTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunProfileChangeTest());
|
| }
|
|
|
| // Tests that the correct views are displayed for showing search results.
|
| -TEST_P(AppListViewTestAura, SearchResultsTest) {
|
| +TEST_F(AppListViewTestAura, SearchResultsTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunSearchResultsTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, SearchResultsTest) {
|
| +TEST_F(AppListViewTestDesktop, SearchResultsTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunSearchResultsTest());
|
| }
|
|
|
| // Tests that the back button navigates through the app list correctly.
|
| -TEST_P(AppListViewTestAura, BackTest) {
|
| +TEST_F(AppListViewTestAura, BackTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunBackTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, BackTest) {
|
| +TEST_F(AppListViewTestDesktop, BackTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunBackTest());
|
| }
|
|
|
| // Tests that the correct views are displayed for showing search results.
|
| -TEST_P(AppListViewTestAura, AppListOverlayTest) {
|
| +TEST_F(AppListViewTestAura, AppListOverlayTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest());
|
| }
|
|
|
| -TEST_P(AppListViewTestDesktop, AppListOverlayTest) {
|
| +TEST_F(AppListViewTestDesktop, AppListOverlayTest) {
|
| EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest());
|
| }
|
|
|
| -#if defined(USE_AURA)
|
| -INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance,
|
| - AppListViewTestAura,
|
| - ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END));
|
| -#endif
|
| -
|
| -INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance,
|
| - AppListViewTestDesktop,
|
| - ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END));
|
| -
|
| } // namespace test
|
| } // namespace app_list
|
|
|