summaryrefslogtreecommitdiffstats
path: root/ash/test
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-09 22:18:33 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-09 22:18:33 +0000
commit46d9961b42b4575bf015ad381aa1c7691ee98c9b (patch)
treebd6a03af2d1b4f55b30d71b5e0961041c8893a65 /ash/test
parentdbb97ba9f0608c2ebf6f02f750df9c5e433b770e (diff)
downloadchromium_src-46d9961b42b4575bf015ad381aa1c7691ee98c9b.zip
chromium_src-46d9961b42b4575bf015ad381aa1c7691ee98c9b.tar.gz
chromium_src-46d9961b42b4575bf015ad381aa1c7691ee98c9b.tar.bz2
Adds an integration test for uninstalling app list search results.
This involves exposing the app list model to a BrowserTest, and ensuring that changes in the model are properly observed by the UI. BUG=277897,169114 TEST=AppListControllerSearchResultsBrowserTest.UninstallSearchResult Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221197 Review URL: https://chromiumcodereview.appspot.com/23072036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r--ash/test/app_list_controller_test_api.cc21
-rw-r--r--ash/test/app_list_controller_test_api.h38
-rw-r--r--ash/test/shell_test_api.cc4
-rw-r--r--ash/test/shell_test_api.h2
4 files changed, 65 insertions, 0 deletions
diff --git a/ash/test/app_list_controller_test_api.cc b/ash/test/app_list_controller_test_api.cc
new file mode 100644
index 0000000..df21070
--- /dev/null
+++ b/ash/test/app_list_controller_test_api.cc
@@ -0,0 +1,21 @@
+// Copyright 2013 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/test/app_list_controller_test_api.h"
+
+#include "ash/test/shell_test_api.h"
+#include "ash/wm/app_list_controller.h"
+
+namespace ash {
+namespace test {
+
+AppListControllerTestApi::AppListControllerTestApi(Shell* shell)
+ : app_list_controller_(ShellTestApi(shell).app_list_controller()) {}
+
+app_list::AppListView* AppListControllerTestApi::view() {
+ return app_list_controller_->view_;
+}
+
+} // namespace test
+} // namespace ash
diff --git a/ash/test/app_list_controller_test_api.h b/ash/test/app_list_controller_test_api.h
new file mode 100644
index 0000000..3534ffb
--- /dev/null
+++ b/ash/test/app_list_controller_test_api.h
@@ -0,0 +1,38 @@
+// Copyright 2013 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_TEST_APP_LIST_CONTROLLER_TEST_API_H_
+#define ASH_TEST_APP_LIST_CONTROLLER_TEST_API_H_
+
+#include "base/basictypes.h"
+
+namespace app_list {
+class AppListView;
+}
+
+namespace ash {
+class Shell;
+namespace internal {
+class AppListController;
+}
+
+namespace test {
+
+// Accesses private data from an AppListController for testing.
+class AppListControllerTestApi {
+ public:
+ explicit AppListControllerTestApi(Shell* shell);
+
+ app_list::AppListView* view();
+
+ private:
+ internal::AppListController* app_list_controller_; // Not owned.
+
+ DISALLOW_COPY_AND_ASSIGN(AppListControllerTestApi);
+};
+
+} // namespace test
+} // namespace ash
+
+#endif // ASH_TEST_APP_LIST_CONTROLLER_TEST_API_H_
diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc
index b921535..d4a6e3e 100644
--- a/ash/test/shell_test_api.cc
+++ b/ash/test/shell_test_api.cc
@@ -52,6 +52,10 @@ internal::DragDropController* ShellTestApi::drag_drop_controller() {
return shell_->drag_drop_controller_.get();
}
+internal::AppListController* ShellTestApi::app_list_controller() {
+ return shell_->app_list_controller_.get();
+}
+
void ShellTestApi::DisableOutputConfiguratorAnimation() {
#if defined(OS_CHROMEOS)
if (shell_->output_configurator_animation_) {
diff --git a/ash/test/shell_test_api.h b/ash/test/shell_test_api.h
index 926d1dd..731f1e1 100644
--- a/ash/test/shell_test_api.h
+++ b/ash/test/shell_test_api.h
@@ -19,6 +19,7 @@ class Shell;
class LauncherModel;
namespace internal {
+class AppListController;
class DragDropController;
class RootWindowLayoutManager;
class ScreenPositionController;
@@ -41,6 +42,7 @@ public:
AshNativeCursorManager* ash_native_cursor_manager();
LauncherModel* launcher_model();
internal::DragDropController* drag_drop_controller();
+ internal::AppListController* app_list_controller();
void DisableOutputConfiguratorAnimation();