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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm

Issue 12279015: Mac Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 TEST_F(BookmarkEditorControllerTreeTest, AddFolderWithFolderSelected) { 447 TEST_F(BookmarkEditorControllerTreeTest, AddFolderWithFolderSelected) {
448 // Folders are NOT added unless the OK button is pressed. 448 // Folders are NOT added unless the OK button is pressed.
449 [controller_ newFolder:nil]; 449 [controller_ newFolder:nil];
450 [controller_ cancel:nil]; 450 [controller_ cancel:nil];
451 EXPECT_EQ(5, folder_bb_->child_count()); 451 EXPECT_EQ(5, folder_bb_->child_count());
452 } 452 }
453 453
454 class BookmarkEditorControllerTreeNoNodeTest : 454 class BookmarkEditorControllerTreeNoNodeTest :
455 public BookmarkEditorControllerTreeTest { 455 public BookmarkEditorControllerTreeTest {
456 public: 456 public:
457 virtual BookmarkEditorController* CreateController() { 457 virtual BookmarkEditorController* CreateController() OVERRIDE {
458 return [[BookmarkEditorController alloc] 458 return [[BookmarkEditorController alloc]
459 initWithParentWindow:test_window() 459 initWithParentWindow:test_window()
460 profile:profile() 460 profile:profile()
461 parent:folder_bb_ 461 parent:folder_bb_
462 node:nil 462 node:nil
463 url:GURL() 463 url:GURL()
464 title:string16() 464 title:string16()
465 configuration:BookmarkEditor::SHOW_TREE]; 465 configuration:BookmarkEditor::SHOW_TREE];
466 } 466 }
467 467
468 }; 468 };
469 469
470 TEST_F(BookmarkEditorControllerTreeNoNodeTest, NewBookmarkNoNode) { 470 TEST_F(BookmarkEditorControllerTreeNoNodeTest, NewBookmarkNoNode) {
471 [controller_ setDisplayName:@"NEW BOOKMARK"]; 471 [controller_ setDisplayName:@"NEW BOOKMARK"];
472 [controller_ setDisplayURL:@"http://NEWURL.com"]; 472 [controller_ setDisplayURL:@"http://NEWURL.com"];
473 [controller_ ok:nil]; 473 [controller_ ok:nil];
474 const BookmarkNode* new_node = folder_bb_->GetChild(5); 474 const BookmarkNode* new_node = folder_bb_->GetChild(5);
475 ASSERT_EQ(0, new_node->child_count()); 475 ASSERT_EQ(0, new_node->child_count());
476 EXPECT_EQ(new_node->GetTitle(), ASCIIToUTF16("NEW BOOKMARK")); 476 EXPECT_EQ(new_node->GetTitle(), ASCIIToUTF16("NEW BOOKMARK"));
477 EXPECT_EQ(new_node->url(), GURL("http://NEWURL.com")); 477 EXPECT_EQ(new_node->url(), GURL("http://NEWURL.com"));
478 } 478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698