summaryrefslogtreecommitdiffstats
path: root/ash/test
diff options
context:
space:
mode:
authorsimon.hong81@gmail.com <simon.hong81@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-14 04:54:06 +0000
committersimon.hong81@gmail.com <simon.hong81@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-14 04:54:06 +0000
commitf00254227244029f5ccb5327e11ab6ec482f6d07 (patch)
treefd81e9eef4eed1171a99225beecbc9b7d001562e /ash/test
parent6e87afa3ce73315ef3408427a4c27c67633545b9 (diff)
downloadchromium_src-f00254227244029f5ccb5327e11ab6ec482f6d07.zip
chromium_src-f00254227244029f5ccb5327e11ab6ec482f6d07.tar.gz
chromium_src-f00254227244029f5ccb5327e11ab6ec482f6d07.tar.bz2
[ash] Remove Launcher::GetLauncherViewForTest()
To export LauncherView, ash::test::LauncherTestAPI class is created. R=sky@chromium.org BUG=NONE TEST=ash_unittests, browser_tests, interactive_ui_tests Review URL: https://chromiumcodereview.appspot.com/23449033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r--ash/test/launcher_test_api.cc24
-rw-r--r--ash/test/launcher_test_api.h39
2 files changed, 63 insertions, 0 deletions
diff --git a/ash/test/launcher_test_api.cc b/ash/test/launcher_test_api.cc
new file mode 100644
index 0000000..e92625f
--- /dev/null
+++ b/ash/test/launcher_test_api.cc
@@ -0,0 +1,24 @@
+// 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/launcher_test_api.h"
+
+#include "ash/launcher/launcher.h"
+
+namespace ash {
+namespace test {
+
+LauncherTestAPI::LauncherTestAPI(Launcher* launcher)
+ : launcher_(launcher) {
+}
+
+LauncherTestAPI::~LauncherTestAPI() {
+}
+
+internal::LauncherView* LauncherTestAPI::launcher_view() {
+ return launcher_->launcher_view_;
+}
+
+} // namespace test
+} // namespace ash
diff --git a/ash/test/launcher_test_api.h b/ash/test/launcher_test_api.h
new file mode 100644
index 0000000..57424af
--- /dev/null
+++ b/ash/test/launcher_test_api.h
@@ -0,0 +1,39 @@
+// 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_LAUNCHER_TEST_API_H_
+#define ASH_TEST_LAUNCHER_TEST_API_H_
+
+#include "base/basictypes.h"
+
+namespace ash {
+
+class Launcher;
+
+namespace internal {
+class LauncherView;
+}
+
+namespace test {
+
+// Use the api in this class to access private members of Launcher.
+class LauncherTestAPI {
+ public:
+ explicit LauncherTestAPI(Launcher* launcher);
+
+ ~LauncherTestAPI();
+
+ // An accessor for |launcher_view|.
+ internal::LauncherView* launcher_view();
+
+ private:
+ Launcher* launcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(LauncherTestAPI);
+};
+
+} // namespace test
+} // namespace ash
+
+#endif // ASH_TEST_LAUNCHER_VIEW_TEST_API_H_