| Index: ash/common/shelf/shelf_application_menu_model_unittest.cc
|
| diff --git a/ash/common/shelf/shelf_application_menu_model_unittest.cc b/ash/common/shelf/shelf_application_menu_model_unittest.cc
|
| index aebee58d403a8146557d07c7ee31a59675bf2a7d..d263bc1e276b382645e2141fb9f4e113a0966b5a 100644
|
| --- a/ash/common/shelf/shelf_application_menu_model_unittest.cc
|
| +++ b/ash/common/shelf/shelf_application_menu_model_unittest.cc
|
| @@ -7,7 +7,6 @@
|
| #include <utility>
|
|
|
| #include "ash/common/test/test_shelf_item_delegate.h"
|
| -#include "ash/public/cpp/shelf_application_menu_item.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -50,7 +49,8 @@ class ShelfApplicationMenuModelTestAPI {
|
| // Verifies the menu contents given an empty item list.
|
| TEST(ShelfApplicationMenuModelTest, VerifyContentsWithNoMenuItems) {
|
| base::string16 title = base::ASCIIToUTF16("title");
|
| - ShelfApplicationMenuModel menu(title, ShelfAppMenuItemList(), nullptr);
|
| + ShelfApplicationMenuModel menu(title, std::vector<mojom::MenuItemPtr>(),
|
| + nullptr);
|
| // Expect the title with separators.
|
| ASSERT_EQ(static_cast<int>(3), menu.GetItemCount());
|
| EXPECT_EQ(ui::MenuModel::TYPE_SEPARATOR, menu.GetTypeAt(0));
|
| @@ -62,13 +62,16 @@ TEST(ShelfApplicationMenuModelTest, VerifyContentsWithNoMenuItems) {
|
|
|
| // Verifies the menu contents given a non-empty item list.
|
| TEST(ShelfApplicationMenuModelTest, VerifyContentsWithMenuItems) {
|
| - ShelfAppMenuItemList items;
|
| + std::vector<mojom::MenuItemPtr> items;
|
| base::string16 title1 = base::ASCIIToUTF16("title1");
|
| base::string16 title2 = base::ASCIIToUTF16("title2");
|
| base::string16 title3 = base::ASCIIToUTF16("title3");
|
| - items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(0, title1));
|
| - items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(1, title2));
|
| - items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(2, title3));
|
| + items.push_back(ash::mojom::MenuItem::New());
|
| + items[0]->label = title1;
|
| + items.push_back(ash::mojom::MenuItem::New());
|
| + items[1]->label = title2;
|
| + items.push_back(ash::mojom::MenuItem::New());
|
| + items[2]->label = title3;
|
|
|
| base::string16 title = base::ASCIIToUTF16("title");
|
| ShelfApplicationMenuModel menu(title, std::move(items), nullptr);
|
| @@ -100,7 +103,7 @@ TEST(ShelfApplicationMenuModelTest, VerifyHistogramBuckets) {
|
|
|
| base::HistogramTester histogram_tester;
|
|
|
| - ShelfAppMenuItemList items;
|
| + std::vector<mojom::MenuItemPtr> items;
|
| ShelfApplicationMenuModel menu(base::ASCIIToUTF16("title"), std::move(items),
|
| nullptr);
|
| ShelfApplicationMenuModelTestAPI menu_test_api(&menu);
|
| @@ -119,10 +122,10 @@ TEST(ShelfApplicationMenuModelTest, VerifyHistogramBuckets) {
|
| TEST(ShelfApplicationMenuModelTest, VerifyHistogramOnExecute) {
|
| base::HistogramTester histogram_tester;
|
|
|
| - ShelfAppMenuItemList items;
|
| - base::string16 title = base::ASCIIToUTF16("title");
|
| - items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(0, title));
|
| + std::vector<mojom::MenuItemPtr> items;
|
| + items.push_back(ash::mojom::MenuItem::New());
|
| test::TestShelfItemDelegate test_delegate(nullptr);
|
| + base::string16 title = base::ASCIIToUTF16("title");
|
| ShelfApplicationMenuModel menu(title, std::move(items), &test_delegate);
|
| menu.ExecuteCommand(0, 0);
|
|
|
|
|