summaryrefslogtreecommitdiffstats
path: root/ui/app_list/test
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 23:17:44 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 23:17:44 +0000
commit1672d9edc9bdc60abdd4c9a7ff942973f4f7941f (patch)
tree0c9eaf8c12a7e530377dc05290efe92ce078e9de /ui/app_list/test
parent782388a4268cd2543ed6f88a01100fc00f2b0293 (diff)
downloadchromium_src-1672d9edc9bdc60abdd4c9a7ff942973f4f7941f.zip
chromium_src-1672d9edc9bdc60abdd4c9a7ff942973f4f7941f.tar.gz
chromium_src-1672d9edc9bdc60abdd4c9a7ff942973f4f7941f.tar.bz2
cleanup: Remove applist v1 code.
- Remove obsolete v1 code and test; - Grid rid of selected_ in AppListItemModel and solely use selected_item_index_ in AppsGridView; - Fix a bug that highlighted item might not be visible and add test to cover it; - Update DEPS; BUG=125964 TEST=Verify app list always show up as bubble and app_list_unittests should pass. Review URL: https://chromiumcodereview.appspot.com/10533032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list/test')
-rw-r--r--ui/app_list/test/app_list_test_suite.cc34
-rw-r--r--ui/app_list/test/app_list_test_suite.h31
-rw-r--r--ui/app_list/test/run_all_unittests.cc9
3 files changed, 74 insertions, 0 deletions
diff --git a/ui/app_list/test/app_list_test_suite.cc b/ui/app_list/test/app_list_test_suite.cc
new file mode 100644
index 0000000..b1c78d4
--- /dev/null
+++ b/ui/app_list/test/app_list_test_suite.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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 "ui/app_list/test/app_list_test_suite.h"
+
+#include "ui/base/ui_base_paths.h"
+#include "ui/base/resource/resource_bundle.h"
+
+namespace app_list {
+namespace test {
+
+AppListTestSuite::AppListTestSuite(int argc, char** argv)
+ : TestSuite(argc, argv) {
+}
+
+void AppListTestSuite::Initialize() {
+ base::TestSuite::Initialize();
+
+ ui::RegisterPathProvider();
+
+ // Force unittests to run using en-US so if we test against string
+ // output, it'll pass regardless of the system language.
+ ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
+}
+
+void AppListTestSuite::Shutdown() {
+ ui::ResourceBundle::CleanupSharedInstance();
+
+ base::TestSuite::Shutdown();
+}
+
+} // namespace test
+} // namespace app_list
diff --git a/ui/app_list/test/app_list_test_suite.h b/ui/app_list/test/app_list_test_suite.h
new file mode 100644
index 0000000..ece107e
--- /dev/null
+++ b/ui/app_list/test/app_list_test_suite.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 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 UI_APP_LIST_TEST_APP_LIST_TEST_SUITE_H_
+#define UI_APP_LIST_TEST_APP_LIST_TEST_SUITE_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/test/test_suite.h"
+
+namespace app_list {
+namespace test {
+
+class AppListTestSuite : public base::TestSuite {
+ public:
+ AppListTestSuite(int argc, char** argv);
+
+ protected:
+ // base::TestSuite overrides:
+ virtual void Initialize() OVERRIDE;
+ virtual void Shutdown() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(AppListTestSuite);
+};
+
+} // namespace test
+} // namespace app_list
+
+#endif // UI_APP_LIST_TEST_APP_LIST_TEST_SUITE_H_
diff --git a/ui/app_list/test/run_all_unittests.cc b/ui/app_list/test/run_all_unittests.cc
new file mode 100644
index 0000000..d4e94e0
--- /dev/null
+++ b/ui/app_list/test/run_all_unittests.cc
@@ -0,0 +1,9 @@
+// Copyright (c) 2012 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 "ui/app_list/test/app_list_test_suite.h"
+
+int main(int argc, char** argv) {
+ return app_list::test::AppListTestSuite(argc, argv).Run();
+}