OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import "base/scoped_nsobject.h" | 7 #import "base/scoped_nsobject.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
13 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" | 13 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" |
14 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 14 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
15 #include "chrome/browser/ui/browser.h" | |
16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
17 #import "testing/gtest_mac.h" | 16 #import "testing/gtest_mac.h" |
18 #include "testing/platform_test.h" | 17 #include "testing/platform_test.h" |
19 | 18 |
20 class TestBookmarkMenuBridge : public BookmarkMenuBridge { | 19 class TestBookmarkMenuBridge : public BookmarkMenuBridge { |
21 public: | 20 public: |
22 TestBookmarkMenuBridge(Profile* profile) | 21 TestBookmarkMenuBridge(Profile* profile) |
23 : BookmarkMenuBridge(profile), | 22 : BookmarkMenuBridge(profile), |
24 menu_([[NSMenu alloc] initWithTitle:@"test"]) { | 23 menu_([[NSMenu alloc] initWithTitle:@"test"]) { |
25 } | 24 } |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 EXPECT_TRUE([item image]); | 307 EXPECT_TRUE([item image]); |
309 | 308 |
310 model->SetTitle(node, ASCIIToUTF16("New Title")); | 309 model->SetTitle(node, ASCIIToUTF16("New Title")); |
311 | 310 |
312 item = [menu itemWithTitle:@"Test Item"]; | 311 item = [menu itemWithTitle:@"Test Item"]; |
313 EXPECT_FALSE(item); | 312 EXPECT_FALSE(item); |
314 item = [menu itemWithTitle:@"New Title"]; | 313 item = [menu itemWithTitle:@"New Title"]; |
315 EXPECT_TRUE(item); | 314 EXPECT_TRUE(item); |
316 } | 315 } |
317 | 316 |
OLD | NEW |