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

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

Issue 11377023: Revert 166369 - Revert 166365 - roll clang 165787:167488 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « build/common.gypi ('k') | tools/clang/scripts/update.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/string_util.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/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"
(...skipping 10 matching lines...) Expand all
21 @implementation FakeHistoryMenuController 21 @implementation FakeHistoryMenuController
22 22
23 - (id)initTest { 23 - (id)initTest {
24 if ((self = [super init])) { 24 if ((self = [super init])) {
25 opened_[0] = NO; 25 opened_[0] = NO;
26 opened_[1] = NO; 26 opened_[1] = NO;
27 } 27 }
28 return self; 28 return self;
29 } 29 }
30 30
31 - (void)openURLForItem:(HistoryMenuBridge::HistoryItem*)item { 31 - (void)openURLForItem:(const HistoryMenuBridge::HistoryItem*)item {
32 opened_[item->session_id] = YES; 32 opened_[item->session_id] = YES;
33 } 33 }
34 34
35 @end // FakeHistoryMenuController 35 @end // FakeHistoryMenuController
36 36
37 class HistoryMenuCocoaControllerTest : public CocoaProfileTest { 37 class HistoryMenuCocoaControllerTest : public CocoaProfileTest {
38 public: 38 public:
39 virtual void SetUp() OVERRIDE { 39 virtual void SetUp() OVERRIDE {
40 CocoaProfileTest::SetUp(); 40 CocoaProfileTest::SetUp();
41 ASSERT_TRUE(profile()); 41 ASSERT_TRUE(profile());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | tools/clang/scripts/update.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698