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

Unified Diff: chrome/browser/cocoa/bookmark_editor_controller_unittest.mm

Issue 249030: Disable "OK" button in edit dialog of bookmark button when name is not valid... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/bookmark_editor_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bookmark_editor_controller_unittest.mm
===================================================================
--- chrome/browser/cocoa/bookmark_editor_controller_unittest.mm (revision 27404)
+++ chrome/browser/cocoa/bookmark_editor_controller_unittest.mm (working copy)
@@ -106,10 +106,21 @@
child = parent->GetChild(0);
EXPECT_TRUE(child->GetURL().is_valid());
- // Confirm OK button enabled/disabled as appropriate.
+ // Confirm OK button enabled/disabled as appropriate:
+ // First test the URL.
EXPECT_TRUE([controller okButtonEnabled]);
[controller setDisplayURL:@""];
EXPECT_FALSE([controller okButtonEnabled]);
[controller setDisplayURL:@"http://www.cnn.com"];
EXPECT_TRUE([controller okButtonEnabled]);
+ // Then test the name.
+ [controller setDisplayName:@""];
+ EXPECT_FALSE([controller okButtonEnabled]);
+ [controller setDisplayName:@" "];
+ EXPECT_FALSE([controller okButtonEnabled]);
+ // Then little mix of both.
+ [controller setDisplayName:@"name"];
+ EXPECT_TRUE([controller okButtonEnabled]);
+ [controller setDisplayURL:@""];
+ EXPECT_FALSE([controller okButtonEnabled]);
}
« no previous file with comments | « chrome/browser/cocoa/bookmark_editor_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698