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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_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/mac/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #include "base/strings/string16.h" 6 #include "base/strings/string16.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
10 #include "chrome/browser/bookmarks/bookmark_test_helpers.h" 10 #include "chrome/browser/bookmarks/bookmark_test_helpers.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 base::scoped_nsobject<FakeBookmarkDraggingInfo> info( 213 base::scoped_nsobject<FakeBookmarkDraggingInfo> info(
214 [[FakeBookmarkDraggingInfo alloc] init]); 214 [[FakeBookmarkDraggingInfo alloc] init]);
215 [view_ setController:info.get()]; 215 [view_ setController:info.get()];
216 [info reset]; 216 [info reset];
217 217
218 BookmarkModel* bookmark_model = 218 BookmarkModel* bookmark_model =
219 BookmarkModelFactory::GetForProfile(profile()); 219 BookmarkModelFactory::GetForProfile(profile());
220 const BookmarkNode* node = 220 const BookmarkNode* node =
221 bookmark_model->AddURL(bookmark_model->bookmark_bar_node(), 221 bookmark_model->AddURL(bookmark_model->bookmark_bar_node(),
222 0, 222 0,
223 ASCIIToUTF16("Test Bookmark"), 223 base::ASCIIToUTF16("Test Bookmark"),
224 GURL("http://www.exmaple.com")); 224 GURL("http://www.exmaple.com"));
225 225
226 base::scoped_nsobject<BookmarkButtonCell> button_cell( 226 base::scoped_nsobject<BookmarkButtonCell> button_cell(
227 [[BookmarkButtonCell buttonCellForNode:node 227 [[BookmarkButtonCell buttonCellForNode:node
228 text:nil 228 text:nil
229 image:nil 229 image:nil
230 menuController:nil] retain]); 230 menuController:nil] retain]);
231 base::scoped_nsobject<BookmarkButton> dragged_button( 231 base::scoped_nsobject<BookmarkButton> dragged_button(
232 [[BookmarkButton alloc] init]); 232 [[BookmarkButton alloc] init]);
233 [dragged_button setCell:button_cell]; 233 [dragged_button setCell:button_cell];
(...skipping 21 matching lines...) Expand all
255 testing_profile_manager()->CreateTestingProfile("other"); 255 testing_profile_manager()->CreateTestingProfile("other");
256 other_profile->CreateBookmarkModel(true); 256 other_profile->CreateBookmarkModel(true);
257 257
258 BookmarkModel* bookmark_model = 258 BookmarkModel* bookmark_model =
259 BookmarkModelFactory::GetForProfile(profile()); 259 BookmarkModelFactory::GetForProfile(profile());
260 test::WaitForBookmarkModelToLoad(bookmark_model); 260 test::WaitForBookmarkModelToLoad(bookmark_model);
261 261
262 const BookmarkNode* node = 262 const BookmarkNode* node =
263 bookmark_model->AddURL(bookmark_model->bookmark_bar_node(), 263 bookmark_model->AddURL(bookmark_model->bookmark_bar_node(),
264 0, 264 0,
265 ASCIIToUTF16("Test Bookmark"), 265 base::ASCIIToUTF16("Test Bookmark"),
266 GURL("http://www.exmaple.com")); 266 GURL("http://www.exmaple.com"));
267 267
268 base::scoped_nsobject<BookmarkButtonCell> button_cell( 268 base::scoped_nsobject<BookmarkButtonCell> button_cell(
269 [[BookmarkButtonCell buttonCellForNode:node 269 [[BookmarkButtonCell buttonCellForNode:node
270 text:nil 270 text:nil
271 image:nil 271 image:nil
272 menuController:nil] retain]); 272 menuController:nil] retain]);
273 base::scoped_nsobject<BookmarkButton> dragged_button( 273 base::scoped_nsobject<BookmarkButton> dragged_button(
274 [[BookmarkButton alloc] init]); 274 [[BookmarkButton alloc] init]);
275 [dragged_button setCell:button_cell]; 275 [dragged_button setCell:button_cell];
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 EXPECT_TRUE([info draggingEnteredCalled]); // Ensure controller pinged. 318 EXPECT_TRUE([info draggingEnteredCalled]); // Ensure controller pinged.
319 EXPECT_TRUE([view_ dropIndicatorShown]); 319 EXPECT_TRUE([view_ dropIndicatorShown]);
320 EXPECT_EQ([view_ dropIndicatorPosition], kFakeIndicatorPos); 320 EXPECT_EQ([view_ dropIndicatorPosition], kFakeIndicatorPos);
321 321
322 [info setDropIndicatorShown:NO]; 322 [info setDropIndicatorShown:NO];
323 EXPECT_EQ([view_ draggingEntered:(id)info.get()], NSDragOperationMove); 323 EXPECT_EQ([view_ draggingEntered:(id)info.get()], NSDragOperationMove);
324 EXPECT_FALSE([view_ dropIndicatorShown]); 324 EXPECT_FALSE([view_ dropIndicatorShown]);
325 } 325 }
326 326
327 } // namespace 327 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698