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 #include "base/scoped_nsobject.h" | 5 #include "base/scoped_nsobject.h" |
6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
11 #include "chrome/browser/cocoa/browser_test_helper.h" | 11 #include "chrome/browser/cocoa/browser_test_helper.h" |
12 #include "chrome/browser/cocoa/cocoa_test_helper.h" | 12 #include "chrome/browser/cocoa/cocoa_test_helper.h" |
13 #include "chrome/browser/cocoa/history_menu_bridge.h" | 13 #include "chrome/browser/cocoa/history_menu_bridge.h" |
14 #include "chrome/browser/cocoa/history_menu_cocoa_controller.h" | 14 #include "chrome/browser/cocoa/history_menu_cocoa_controller.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 @interface FakeHistoryMenuController : HistoryMenuCocoaController { | 17 @interface FakeHistoryMenuController : HistoryMenuCocoaController { |
18 @public | 18 @public |
19 BOOL opened_[2]; | 19 BOOL opened_[2]; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 std::map<NSMenuItem*, HistoryMenuBridge::HistoryItem*>::iterator it = | 82 std::map<NSMenuItem*, HistoryMenuBridge::HistoryItem*>::iterator it = |
83 items.begin(); | 83 items.begin(); |
84 | 84 |
85 for ( ; it != items.end(); ++it) { | 85 for ( ; it != items.end(); ++it) { |
86 HistoryMenuBridge::HistoryItem* item = it->second; | 86 HistoryMenuBridge::HistoryItem* item = it->second; |
87 EXPECT_FALSE(controller()->opened_[item->session_id]); | 87 EXPECT_FALSE(controller()->opened_[item->session_id]); |
88 [controller() openHistoryMenuItem:it->first]; | 88 [controller() openHistoryMenuItem:it->first]; |
89 EXPECT_TRUE(controller()->opened_[item->session_id]); | 89 EXPECT_TRUE(controller()->opened_[item->session_id]); |
90 } | 90 } |
91 } | 91 } |
OLD | NEW |