shelf_test_util.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (c) 2019 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_SHELF_SHELF_TEST_UTIL_H_
  5. #define ASH_SHELF_SHELF_TEST_UTIL_H_
  6. #include <string>
  7. #include "ash/public/cpp/shelf_item.h"
  8. namespace gfx {
  9. class ImageSkia;
  10. } // namespace gfx
  11. namespace ash {
  12. class ShelfTestUtil {
  13. public:
  14. ShelfTestUtil(const ShelfTestUtil&) = delete;
  15. ShelfTestUtil& operator=(const ShelfTestUtil&) = delete;
  16. // Adds an application shortcut to the shelf model, with the given identifier
  17. // and the given shelf item type.
  18. static ShelfItem AddAppShortcut(const std::string& id, ShelfItemType type);
  19. // Adds an application shortcut to the shelf model, with the given identifier,
  20. // the given shelf item type, and the given icon.
  21. static ShelfItem AddAppShortcutWithIcon(const std::string& id,
  22. ShelfItemType type,
  23. gfx::ImageSkia icon);
  24. };
  25. // Waits for an overview enter animation if |enter|; waits for an overview exit
  26. // animation otherwise.
  27. void WaitForOverviewAnimation(bool enter);
  28. } // namespace ash
  29. #endif // ASH_SHELF_SHELF_TEST_UTIL_H_