OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/mac/scoped_nsobject.h" | 5 #include "base/mac/scoped_nsobject.h" |
6 #include "base/strings/sys_string_conversions.h" | 6 #include "base/strings/sys_string_conversions.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/search/search.h" | |
10 #include "chrome/browser/sync/glue/session_model_associator.h" | 9 #include "chrome/browser/sync/glue/session_model_associator.h" |
11 #include "chrome/browser/sync/profile_sync_service_factory.h" | 10 #include "chrome/browser/sync/profile_sync_service_factory.h" |
12 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
13 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 12 #include "chrome/browser/ui/cocoa/run_loop_testing.h" |
14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 13 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
15 #import "chrome/browser/ui/cocoa/view_resizer_pong.h" | 14 #import "chrome/browser/ui/cocoa/view_resizer_pong.h" |
16 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h" | 15 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h" |
17 #include "chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h" | 16 #include "chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h" |
18 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" | 17 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" |
19 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" | 18 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 substringToIndex:title_length - 1]; | 184 substringToIndex:title_length - 1]; |
186 EXPECT_NSEQ(expected_substring, actual_substring); | 185 EXPECT_NSEQ(expected_substring, actual_substring); |
187 | 186 |
188 controller_.reset(); | 187 controller_.reset(); |
189 fake_model_.reset(); | 188 fake_model_.reset(); |
190 } | 189 } |
191 | 190 |
192 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model | 191 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model |
193 // it's observing. | 192 // it's observing. |
194 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { | 193 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { |
195 chrome::EnableInstantExtendedAPIForTesting(); | |
196 [controller_ menuNeedsUpdate:[controller_ menu]]; | 194 [controller_ menuNeedsUpdate:[controller_ menu]]; |
197 // If the delete order is wrong then the test will crash on exit. | 195 // If the delete order is wrong then the test will crash on exit. |
198 } | 196 } |
199 | 197 |
200 } // namespace | 198 } // namespace |
OLD | NEW |