app_list_menu_model_adapter_unittest.cc 963 B

1234567891011121314151617181920212223242526
  1. // Copyright 2018 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. #include "ash/app_list/views/app_list_menu_model_adapter.h"
  5. #include "ash/public/cpp/app_menu_constants.h"
  6. #include "base/callback.h"
  7. #include "testing/gtest/include/gtest/gtest.h"
  8. namespace ash {
  9. namespace {
  10. // Tests that NOTIFICATION_CONTAINER is enabled. This ensures that the
  11. // container is able to handle gesture events.
  12. TEST(AppListMenuModelAdapterTest, NotificationContainerEnabled) {
  13. AppListMenuModelAdapter adapter(
  14. "test-app-id", std::make_unique<ui::SimpleMenuModel>(nullptr), nullptr,
  15. ui::MenuSourceType::MENU_SOURCE_TYPE_LAST, AppLaunchedMetricParams(),
  16. AppListMenuModelAdapter::FULLSCREEN_APP_GRID, base::OnceClosure(),
  17. false /* is_tablet_mode */);
  18. EXPECT_TRUE(adapter.IsCommandEnabled(NOTIFICATION_CONTAINER));
  19. }
  20. } // namespace
  21. } // namespace ash