Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: chrome/browser/apps/custom_launcher_page_browsertest_views.cc

Issue 947903002: Change ContentsView::SetActivePage to use States rather than indexes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/apps/custom_launcher_page_browsertest_views.cc
diff --git a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
index 8f4fb35a5e60229607c314680c7920f74d81dc80..781c6b7c509042ad0550f4b6a3698db437b24f90 100644
--- a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
+++ b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
@@ -88,7 +88,7 @@ class CustomLauncherPageBrowserTest
void SetActivePageAndVerify(app_list::AppListModel::State state) {
app_list::ContentsView* contents_view =
GetAppListView()->app_list_main_view()->contents_view();
- contents_view->SetActivePage(contents_view->GetPageIndexForState(state));
+ contents_view->SetActivePage(state);
EXPECT_TRUE(contents_view->IsStateActive(state));
}
@@ -130,15 +130,14 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest,
{
ExtensionTestMessageListener listener("onPageProgressAt1", false);
- contents_view->SetActivePage(contents_view->GetPageIndexForState(
- app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE));
+ contents_view->SetActivePage(
+ app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE);
listener.WaitUntilSatisfied();
}
{
ExtensionTestMessageListener listener("onPageProgressAt0", false);
- contents_view->SetActivePage(contents_view->GetPageIndexForState(
- app_list::AppListModel::STATE_START));
+ contents_view->SetActivePage(app_list::AppListModel::STATE_START);
listener.WaitUntilSatisfied();
}
@@ -275,8 +274,8 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LauncherPageSubpages) {
{
ExtensionTestMessageListener listener("onPageProgressAt1", false);
- contents_view->SetActivePage(contents_view->GetPageIndexForState(
- app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE));
+ contents_view->SetActivePage(
+ app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE);
listener.WaitUntilSatisfied();
EXPECT_TRUE(contents_view->IsStateActive(
app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE));
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_service_views.cc » ('j') | ui/app_list/views/contents_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698