OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <AppKit/AppKit.h> | 5 #import <AppKit/AppKit.h> |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 menu_(menu) { | 27 menu_(menu) { |
28 } | 28 } |
29 virtual ~TestBookmarkMenuBridge() { | 29 virtual ~TestBookmarkMenuBridge() { |
30 [menu_ autorelease]; | 30 [menu_ autorelease]; |
31 } | 31 } |
32 | 32 |
33 NSMenu* menu_; | 33 NSMenu* menu_; |
34 | 34 |
35 protected: | 35 protected: |
36 // Overridden from BookmarkMenuBridge. | 36 // Overridden from BookmarkMenuBridge. |
37 virtual NSMenu* BookmarkMenu() OVERRIDE { | 37 virtual NSMenu* BookmarkMenu() override { |
38 return menu_; | 38 return menu_; |
39 } | 39 } |
40 }; | 40 }; |
41 | 41 |
42 // TODO(jrg): see refactor comment in bookmark_bar_state_controller_unittest.mm | 42 // TODO(jrg): see refactor comment in bookmark_bar_state_controller_unittest.mm |
43 class BookmarkMenuBridgeTest : public CocoaProfileTest { | 43 class BookmarkMenuBridgeTest : public CocoaProfileTest { |
44 public: | 44 public: |
45 | 45 |
46 virtual void SetUp() { | 46 virtual void SetUp() { |
47 CocoaProfileTest::SetUp(); | 47 CocoaProfileTest::SetUp(); |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 EXPECT_TRUE([item image]); | 395 EXPECT_TRUE([item image]); |
396 | 396 |
397 model->SetTitle(node, ASCIIToUTF16("New Title")); | 397 model->SetTitle(node, ASCIIToUTF16("New Title")); |
398 | 398 |
399 item = [menu itemWithTitle:@"Test Item"]; | 399 item = [menu itemWithTitle:@"Test Item"]; |
400 EXPECT_FALSE(item); | 400 EXPECT_FALSE(item); |
401 item = [menu itemWithTitle:@"New Title"]; | 401 item = [menu itemWithTitle:@"New Title"]; |
402 EXPECT_TRUE(item); | 402 EXPECT_TRUE(item); |
403 } | 403 } |
404 | 404 |
OLD | NEW |