OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/common/shelf/shelf_application_menu_model.h" | 5 #include "ash/shelf/shelf_application_menu_model.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/common/test/test_shelf_item_delegate.h" | |
10 #include "ash/public/cpp/shelf_application_menu_item.h" | 9 #include "ash/public/cpp/shelf_application_menu_item.h" |
| 10 #include "ash/test/test_shelf_item_delegate.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/test/histogram_tester.h" | 14 #include "base/test/histogram_tester.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace ash { | 17 namespace ash { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(0, title)); | 124 items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(0, title)); |
125 test::TestShelfItemDelegate test_delegate(nullptr); | 125 test::TestShelfItemDelegate test_delegate(nullptr); |
126 ShelfApplicationMenuModel menu(title, std::move(items), &test_delegate); | 126 ShelfApplicationMenuModel menu(title, std::move(items), &test_delegate); |
127 menu.ExecuteCommand(0, 0); | 127 menu.ExecuteCommand(0, 0); |
128 | 128 |
129 histogram_tester.ExpectTotalCount(kNumItemsEnabledHistogramName, 1); | 129 histogram_tester.ExpectTotalCount(kNumItemsEnabledHistogramName, 1); |
130 histogram_tester.ExpectTotalCount(kSelectedMenuItemIndexHistogramName, 1); | 130 histogram_tester.ExpectTotalCount(kSelectedMenuItemIndexHistogramName, 1); |
131 } | 131 } |
132 | 132 |
133 } // namespace ash | 133 } // namespace ash |
OLD | NEW |