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

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

Issue 7569030: Try to fix BookmarkEditorControllerNoNodeTest.NoNodeNoTree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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 #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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 [controller_ runAsModalSheet]; 149 [controller_ runAsModalSheet];
150 } 150 }
151 151
152 virtual void TearDown() { 152 virtual void TearDown() {
153 controller_ = NULL; 153 controller_ = NULL;
154 CocoaTest::TearDown(); 154 CocoaTest::TearDown();
155 } 155 }
156 }; 156 };
157 157
158 TEST_F(BookmarkEditorControllerNoNodeTest, NoNodeNoTree) { 158 TEST_F(BookmarkEditorControllerNoNodeTest, NoNodeNoTree) {
159 EXPECT_EQ(@"", [controller_ displayName]); 159 EXPECT_NSEQ(@"", [controller_ displayName]);
160 EXPECT_EQ(nil, [controller_ displayURL]); 160 EXPECT_EQ(nil, [controller_ displayURL]);
161 EXPECT_FALSE([controller_ okButtonEnabled]); 161 EXPECT_FALSE([controller_ okButtonEnabled]);
162 [controller_ cancel:nil]; 162 [controller_ cancel:nil];
163 } 163 }
164 164
165 class BookmarkEditorControllerYesNodeTest : public CocoaTest { 165 class BookmarkEditorControllerYesNodeTest : public CocoaTest {
166 public: 166 public:
167 BrowserTestHelper browser_helper_; 167 BrowserTestHelper browser_helper_;
168 string16 default_title_; 168 string16 default_title_;
169 const char* url_name_; 169 const char* url_name_;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 TEST_F(BookmarkEditorControllerTreeNoNodeTest, NewBookmarkNoNode) { 415 TEST_F(BookmarkEditorControllerTreeNoNodeTest, NewBookmarkNoNode) {
416 [controller_ setDisplayName:@"NEW BOOKMARK"]; 416 [controller_ setDisplayName:@"NEW BOOKMARK"];
417 [controller_ setDisplayURL:@"http://NEWURL.com"]; 417 [controller_ setDisplayURL:@"http://NEWURL.com"];
418 [controller_ ok:nil]; 418 [controller_ ok:nil];
419 const BookmarkNode* new_node = folder_bb_->GetChild(5); 419 const BookmarkNode* new_node = folder_bb_->GetChild(5);
420 ASSERT_EQ(0, new_node->child_count()); 420 ASSERT_EQ(0, new_node->child_count());
421 EXPECT_EQ(new_node->GetTitle(), ASCIIToUTF16("NEW BOOKMARK")); 421 EXPECT_EQ(new_node->GetTitle(), ASCIIToUTF16("NEW BOOKMARK"));
422 EXPECT_EQ(new_node->url(), GURL("http://NEWURL.com")); 422 EXPECT_EQ(new_node->url(), GURL("http://NEWURL.com"));
423 } 423 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698