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

Unified Diff: chrome/browser/ui/app_list/app_list_service_views_browsertest.cc

Issue 306023011: Add new DialogDelegate for dialogs in the App List (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Layout call in ClientView and removed AppListClientView to use this instead Created 6 years, 6 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/ui/app_list/app_list_service_views_browsertest.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc b/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
index 024e7a5163719791dc4b8fe2ffa279f62e0582bc..667a5332b98404c9462d41f667abbd7e762a6074 100644
--- a/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
@@ -21,39 +21,6 @@
#include "ash/test/app_list_controller_test_api.h"
#endif
-namespace {
-
-app_list::AppListView* GetAppListView(AppListService* service) {
-#if defined(OS_CHROMEOS)
- return ash::test::AppListControllerTestApi(ash::Shell::GetInstance()).view();
-#else
- return static_cast<AppListServiceViews*>(service)->shower().app_list();
-#endif
-}
-
-} // namespace
-
-namespace test {
-
-// Allow access to private variables of the AppListView for testing.
-class AppListViewTestApi {
- public:
- explicit AppListViewTestApi(app_list::AppListView* view) : view_(view) {}
- virtual ~AppListViewTestApi() {}
-
- bool is_overlay_visible() {
- DCHECK(view_->overlay_view_);
- return view_->overlay_view_->visible();
- }
-
- private:
- app_list::AppListView* view_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListViewTestApi);
-};
-
-} // namespace test
-
// Browser Test for AppListService on Views platforms.
typedef InProcessBrowserTest AppListServiceViewsBrowserTest;
@@ -127,13 +94,10 @@ IN_PROC_BROWSER_TEST_F(AppListControllerAppInfoDialogBrowserTest,
views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
ASSERT_TRUE(widget);
- test::AppListViewTestApi test_api(GetAppListView(service));
-
// Open the app info dialog.
views::Widget::Widgets owned_widgets;
widget->GetAllOwnedWidgets(window, &owned_widgets);
EXPECT_EQ(0U, owned_widgets.size());
- EXPECT_FALSE(test_api.is_overlay_visible());
AppListControllerDelegate* controller = service->GetControllerDelegate();
ASSERT_TRUE(controller);
@@ -143,7 +107,6 @@ IN_PROC_BROWSER_TEST_F(AppListControllerAppInfoDialogBrowserTest,
owned_widgets.clear();
widget->GetAllOwnedWidgets(window, &owned_widgets);
EXPECT_EQ(1U, owned_widgets.size());
- EXPECT_TRUE(test_api.is_overlay_visible());
// Close the app info dialog.
views::Widget* app_info_dialog = *owned_widgets.begin();
@@ -153,5 +116,4 @@ IN_PROC_BROWSER_TEST_F(AppListControllerAppInfoDialogBrowserTest,
owned_widgets.clear();
widget->GetAllOwnedWidgets(window, &owned_widgets);
EXPECT_EQ(0U, owned_widgets.size());
- EXPECT_FALSE(test_api.is_overlay_visible());
}

Powered by Google App Engine
This is Rietveld 408576698