status_area_widget_test_helper.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2014 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. #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_TEST_HELPER_H_
  5. #define ASH_SYSTEM_STATUS_AREA_WIDGET_TEST_HELPER_H_
  6. #include "ui/compositor/layer.h"
  7. namespace ash {
  8. enum class LoginStatus;
  9. class StatusAreaWidget;
  10. class StatusAreaWidgetTestHelper {
  11. public:
  12. StatusAreaWidgetTestHelper() = delete;
  13. StatusAreaWidgetTestHelper(const StatusAreaWidgetTestHelper&) = delete;
  14. StatusAreaWidgetTestHelper& operator=(const StatusAreaWidgetTestHelper&) =
  15. delete;
  16. static LoginStatus GetUserLoginStatus();
  17. // Returns the StatusAreaWidget that appears on the primary display.
  18. static StatusAreaWidget* GetStatusAreaWidget();
  19. // Returns the StatusAreaWidget that appears on the secondary display.
  20. static StatusAreaWidget* GetSecondaryStatusAreaWidget();
  21. // Waits until status area animations are over.
  22. static void WaitForAnimationEnd(StatusAreaWidget* status_area_widget);
  23. // Waits until one child view's layer animations are over.
  24. static void WaitForLayerAnimationEnd(ui::Layer* layer);
  25. };
  26. } // namespace ash
  27. #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_TEST_HELPER_H_