OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_TEST_LAUNCHER_VIEW_TEST_API_H_ |
| 6 #define ASH_TEST_LAUNCHER_VIEW_TEST_API_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 |
| 11 namespace ash { |
| 12 |
| 13 namespace internal { |
| 14 class LauncherButton; |
| 15 class LauncherView; |
| 16 } |
| 17 |
| 18 namespace test { |
| 19 |
| 20 // Use the api in this class to test LauncherView. |
| 21 class LauncherViewTestAPI { |
| 22 public: |
| 23 explicit LauncherViewTestAPI(internal::LauncherView* launcher_view); |
| 24 ~LauncherViewTestAPI(); |
| 25 |
| 26 // Number of icons displayed. |
| 27 int GetButtonCount(); |
| 28 |
| 29 // Retrieve the button at |index|. |
| 30 internal::LauncherButton* GetButton(int index); |
| 31 |
| 32 // Last visible button index. |
| 33 int GetLastVisibleIndex(); |
| 34 |
| 35 // Returns true if overflow button is visible. |
| 36 bool IsOverflowButtonVisible(); |
| 37 |
| 38 // Sets animation duration in milliseconds for test. |
| 39 void SetAnimationDuration(int duration_ms); |
| 40 |
| 41 // Runs message loop and waits until all add/remove animations are done. |
| 42 void RunMessageLoopUntilAnimationsDone(); |
| 43 |
| 44 private: |
| 45 internal::LauncherView* launcher_view_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(LauncherViewTestAPI); |
| 48 }; |
| 49 |
| 50 } // namespace test |
| 51 } // namespace ash |
| 52 |
| 53 #endif // ASH_TEST_LAUNCHER_VIEW_TEST_API_H_ |
OLD | NEW |