| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 [owned_apps_grid_controller_ setDelegate:NULL]; | 122 [owned_apps_grid_controller_ setDelegate:NULL]; |
| 123 | 123 |
| 124 owned_delegate_->ReplaceTestModel(item_count); | 124 owned_delegate_->ReplaceTestModel(item_count); |
| 125 [owned_apps_grid_controller_ setDelegate:owned_delegate_.get()]; | 125 [owned_apps_grid_controller_ setDelegate:owned_delegate_.get()]; |
| 126 } | 126 } |
| 127 | 127 |
| 128 AppListTestModel* model() { return owned_delegate_->GetTestModel(); } | 128 AppListTestModel* model() { return owned_delegate_->GetTestModel(); } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 base::scoped_nsobject<AppsGridController> owned_apps_grid_controller_; | 131 base::scoped_nsobject<AppsGridController> owned_apps_grid_controller_; |
| 132 scoped_ptr<AppListTestViewDelegate> owned_delegate_; | 132 std::unique_ptr<AppListTestViewDelegate> owned_delegate_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(AppsGridControllerTest); | 134 DISALLOW_COPY_AND_ASSIGN(AppsGridControllerTest); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 class AppListItemWithMenu : public AppListItem { | 137 class AppListItemWithMenu : public AppListItem { |
| 138 public: | 138 public: |
| 139 explicit AppListItemWithMenu(const std::string& id) | 139 explicit AppListItemWithMenu(const std::string& id) |
| 140 : AppListItem(id), | 140 : AppListItem(id), |
| 141 menu_model_(NULL), | 141 menu_model_(NULL), |
| 142 menu_ready_(true) { | 142 menu_ready_(true) { |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 // Test that a button being held down with the left button does not also show | 970 // Test that a button being held down with the left button does not also show |
| 971 // a context menu. | 971 // a context menu. |
| 972 [GetItemViewAt(0) highlight:YES]; | 972 [GetItemViewAt(0) highlight:YES]; |
| 973 EXPECT_FALSE([page menuForEvent:mouse_at_cell_0]); | 973 EXPECT_FALSE([page menuForEvent:mouse_at_cell_0]); |
| 974 [GetItemViewAt(0) highlight:NO]; | 974 [GetItemViewAt(0) highlight:NO]; |
| 975 EXPECT_TRUE([page menuForEvent:mouse_at_cell_0]); | 975 EXPECT_TRUE([page menuForEvent:mouse_at_cell_0]); |
| 976 } | 976 } |
| 977 | 977 |
| 978 } // namespace test | 978 } // namespace test |
| 979 } // namespace app_list | 979 } // namespace app_list |
| OLD | NEW |