OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h" | 10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE { | 43 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE { |
44 return true; | 44 return true; |
45 } | 45 } |
46 | 46 |
47 virtual bool GetAcceleratorForCommandId( | 47 virtual bool GetAcceleratorForCommandId( |
48 int command_id, | 48 int command_id, |
49 ui::Accelerator* accelerator) OVERRIDE { return false; } | 49 ui::Accelerator* accelerator) OVERRIDE { return false; } |
50 | 50 |
51 virtual void ExecuteCommand(int command_id, int event_flags) {} | 51 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE {} |
52 }; | 52 }; |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 TEST_VIEW(AutofillAccountChooserTest, view_); | 56 TEST_VIEW(AutofillAccountChooserTest, view_); |
57 | 57 |
58 // Make sure account chooser has all required subviews | 58 // Make sure account chooser has all required subviews |
59 TEST_F(AutofillAccountChooserTest, SubViews) { | 59 TEST_F(AutofillAccountChooserTest, SubViews) { |
60 bool hasIcon = false; | 60 bool hasIcon = false; |
61 bool hasLink = false; | 61 bool hasLink = false; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 break; | 96 break; |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 NSArray* items = [[button attachedMenu] itemArray]; | 100 NSArray* items = [[button attachedMenu] itemArray]; |
101 EXPECT_EQ(3U, [items count]); | 101 EXPECT_EQ(3U, [items count]); |
102 EXPECT_NSEQ(@"", [[items objectAtIndex:0] title]); | 102 EXPECT_NSEQ(@"", [[items objectAtIndex:0] title]); |
103 EXPECT_NSEQ(@"one", [[items objectAtIndex:1] title]); | 103 EXPECT_NSEQ(@"one", [[items objectAtIndex:1] title]); |
104 EXPECT_NSEQ(@"two", [[items objectAtIndex:2] title]); | 104 EXPECT_NSEQ(@"two", [[items objectAtIndex:2] title]); |
105 } | 105 } |
OLD | NEW |