| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/message_loop/message_pump_mac.h" | 11 #include "base/message_loop/message_pump_mac.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/profiles/avatar_menu.h" | 13 #include "chrome/browser/profiles/avatar_menu.h" |
| 14 #include "chrome/browser/profiles/avatar_menu_observer.h" | 14 #include "chrome/browser/profiles/avatar_menu_observer.h" |
| 15 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 15 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 16 #include "chrome/test/base/testing_browser_process.h" | 16 #include "chrome/test/base/testing_browser_process.h" |
| 17 #include "chrome/test/base/testing_profile_manager.h" | 17 #include "chrome/test/base/testing_profile_manager.h" |
| 18 #include "components/signin/core/common/profile_management_switches.h" | 18 #include "components/signin/core/common/profile_management_switches.h" |
| 19 #include "components/sync_preferences/pref_service_syncable.h" | 19 #include "components/sync_preferences/pref_service_syncable.h" |
| 20 #include "content/public/test/test_browser_thread_bundle.h" | 20 #include "content/public/test/test_browser_thread_bundle.h" |
| 21 #include "testing/gtest_mac.h" | 21 #include "testing/gtest_mac.h" |
| 22 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" | 22 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
| 23 #include "ui/events/test/cocoa_test_event_utils.h" | 23 #include "ui/events/test/cocoa_test_event_utils.h" |
| 24 | 24 |
| 25 class AvatarMenuBubbleControllerTest : public CocoaTest { | 25 class AvatarMenuBubbleControllerTest : public CocoaTest { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 [controller() keyDown:event]; | 265 [controller() keyDown:event]; |
| 266 EXPECT_EQ([[controller() items] objectAtIndex:0], GetHighlightedItem()); | 266 EXPECT_EQ([[controller() items] objectAtIndex:0], GetHighlightedItem()); |
| 267 | 267 |
| 268 [controller() keyDown:event]; | 268 [controller() keyDown:event]; |
| 269 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); | 269 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); |
| 270 | 270 |
| 271 // There are no more items now so going up should stay at the first item. | 271 // There are no more items now so going up should stay at the first item. |
| 272 [controller() keyDown:event]; | 272 [controller() keyDown:event]; |
| 273 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); | 273 EXPECT_EQ([[controller() items] objectAtIndex:1], GetHighlightedItem()); |
| 274 } | 274 } |
| OLD | NEW |