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

Side by Side Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/mac/scoped_nsobject.h" 6 #include "base/mac/scoped_nsobject.h"
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/sync/glue/session_model_associator.h" 10 #include "chrome/browser/sync/glue/session_model_associator.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 controller_.reset(); 196 controller_.reset();
197 fake_model_.reset(); 197 fake_model_.reset();
198 } 198 }
199 199
200 TEST_F(WrenchMenuControllerTest, RecentTabsElideTitle) { 200 TEST_F(WrenchMenuControllerTest, RecentTabsElideTitle) {
201 // Add 1 session with 1 window and 2 tabs. 201 // Add 1 session with 1 window and 2 tabs.
202 RecentTabsBuilderTestHelper recent_tabs_builder; 202 RecentTabsBuilderTestHelper recent_tabs_builder;
203 recent_tabs_builder.AddSession(); 203 recent_tabs_builder.AddSession();
204 recent_tabs_builder.AddWindow(0); 204 recent_tabs_builder.AddWindow(0);
205 base::string16 tab1_short_title = ASCIIToUTF16("Short"); 205 base::string16 tab1_short_title = base::ASCIIToUTF16("Short");
206 recent_tabs_builder.AddTabWithInfo(0, 0, base::Time::Now(), tab1_short_title); 206 recent_tabs_builder.AddTabWithInfo(0, 0, base::Time::Now(), tab1_short_title);
207 base::string16 tab2_long_title = ASCIIToUTF16("Very very very very very very " 207 base::string16 tab2_long_title = base::ASCIIToUTF16(
208 "very very very very very very long"); 208 "Very very very very very very very very very very very very long");
209 recent_tabs_builder.AddTabWithInfo(0, 0, 209 recent_tabs_builder.AddTabWithInfo(0, 0,
210 base::Time::Now() - base::TimeDelta::FromMinutes(10), tab2_long_title); 210 base::Time::Now() - base::TimeDelta::FromMinutes(10), tab2_long_title);
211 RegisterRecentTabs(&recent_tabs_builder); 211 RegisterRecentTabs(&recent_tabs_builder);
212 212
213 RecentTabsSubMenuModel recent_tabs_sub_menu_model( 213 RecentTabsSubMenuModel recent_tabs_sub_menu_model(
214 NULL, browser(), GetOpenTabsDelegate()); 214 NULL, browser(), GetOpenTabsDelegate());
215 fake_model_->AddSubMenuWithStringId( 215 fake_model_->AddSubMenuWithStringId(
216 IDC_RECENT_TABS_MENU, IDS_RECENT_TABS_MENU, 216 IDC_RECENT_TABS_MENU, IDS_RECENT_TABS_MENU,
217 &recent_tabs_sub_menu_model); 217 &recent_tabs_sub_menu_model);
218 218
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model 259 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model
260 // it's observing. 260 // it's observing.
261 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { 261 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) {
262 [controller_ menuNeedsUpdate:[controller_ menu]]; 262 [controller_ menuNeedsUpdate:[controller_ menu]];
263 // If the delete order is wrong then the test will crash on exit. 263 // If the delete order is wrong then the test will crash on exit.
264 } 264 }
265 265
266 } // namespace 266 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698