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