Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/ui/cocoa/history_menu_cocoa_controller_unittest.mm

Issue 24120005: Cleanup and IWYU-ify CocoaProfileTest and related tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include order Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/mac/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/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 "chrome/test/base/testing_profile.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 @interface FakeHistoryMenuController : HistoryMenuCocoaController { 16 @interface FakeHistoryMenuController : HistoryMenuCocoaController {
16 @public 17 @public
17 BOOL opened_[2]; 18 BOOL opened_[2];
18 } 19 }
19 @end 20 @end
20 21
21 @implementation FakeHistoryMenuController 22 @implementation FakeHistoryMenuController
22 23
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 std::map<NSMenuItem*, HistoryMenuBridge::HistoryItem*>::iterator it = 80 std::map<NSMenuItem*, HistoryMenuBridge::HistoryItem*>::iterator it =
80 items.begin(); 81 items.begin();
81 82
82 for ( ; it != items.end(); ++it) { 83 for ( ; it != items.end(); ++it) {
83 HistoryMenuBridge::HistoryItem* item = it->second; 84 HistoryMenuBridge::HistoryItem* item = it->second;
84 EXPECT_FALSE(controller()->opened_[item->session_id]); 85 EXPECT_FALSE(controller()->opened_[item->session_id]);
85 [controller() openHistoryMenuItem:it->first]; 86 [controller() openHistoryMenuItem:it->first];
86 EXPECT_TRUE(controller()->opened_[item->session_id]); 87 EXPECT_TRUE(controller()->opened_[item->session_id]);
87 } 88 }
88 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698