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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 did_show_(false), | 39 did_show_(false), |
40 did_close_(false) { | 40 did_close_(false) { |
41 } | 41 } |
42 | 42 |
43 bool IsCommandIdChecked(int command_id) const override { return false; } | 43 bool IsCommandIdChecked(int command_id) const override { return false; } |
44 bool IsCommandIdEnabled(int command_id) const override { | 44 bool IsCommandIdEnabled(int command_id) const override { |
45 ++enable_count_; | 45 ++enable_count_; |
46 return true; | 46 return true; |
47 } | 47 } |
48 bool GetAcceleratorForCommandId(int command_id, | 48 bool GetAcceleratorForCommandId(int command_id, |
49 Accelerator* accelerator) override { | 49 Accelerator* accelerator) const override { |
50 return false; | 50 return false; |
51 } | 51 } |
52 void ExecuteCommand(int command_id, int event_flags) override { | 52 void ExecuteCommand(int command_id, int event_flags) override { |
53 ++execute_count_; | 53 ++execute_count_; |
54 } | 54 } |
55 | 55 |
56 void MenuWillShow(SimpleMenuModel* /*source*/) override { | 56 void MenuWillShow(SimpleMenuModel* /*source*/) override { |
57 EXPECT_FALSE(did_show_); | 57 EXPECT_FALSE(did_show_); |
58 EXPECT_FALSE(did_close_); | 58 EXPECT_FALSE(did_close_); |
59 did_show_ = true; | 59 did_show_ = true; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 // Pump the task that notifies the delegate. | 392 // Pump the task that notifies the delegate. |
393 message_loop.RunUntilIdle(); | 393 message_loop.RunUntilIdle(); |
394 | 394 |
395 // Expect that the delegate got notified properly. | 395 // Expect that the delegate got notified properly. |
396 EXPECT_TRUE(delegate.did_close_); | 396 EXPECT_TRUE(delegate.did_close_); |
397 } | 397 } |
398 | 398 |
399 } // namespace | 399 } // namespace |
400 | 400 |
401 } // namespace ui | 401 } // namespace ui |
OLD | NEW |