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

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

Issue 118095: Display a tooltip when mousing over a tab title. (Closed)
Patch Set: now with unit test goodness Created 11 years, 7 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/tab_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/tab_controller_unittest.mm
diff --git a/chrome/browser/cocoa/tab_controller_unittest.mm b/chrome/browser/cocoa/tab_controller_unittest.mm
index 7d1228af0716c48031544dd0d9572f594265c6ae..c6526beaf1803a4b8b43806e7b4f667254a73bd4 100644
--- a/chrome/browser/cocoa/tab_controller_unittest.mm
+++ b/chrome/browser/cocoa/tab_controller_unittest.mm
@@ -107,6 +107,19 @@ TEST_F(TabControllerTest, APISelection) {
[[controller view] removeFromSuperview];
}
+// Tests that setting the title of a tab sets the tooltip as well.
John Grabowski 2009/06/02 00:10:51 u de man jeremy.
+TEST_F(TabControllerTest, ToolTip) {
+ NSWindow* window = cocoa_helper_.window();
+
+ scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ [[window contentView] addSubview:[controller view]];
+
+ EXPECT_TRUE([[controller toolTip] length] == 0);
+ NSString *tooltip_string = @"Some text to use as a tab title";
+ [controller setTitle:tooltip_string];
+ EXPECT_TRUE([tooltip_string isEqualToString:[controller toolTip]]);
+}
+
// Tests setting the |loading| property via code.
TEST_F(TabControllerTest, Loading) {
NSWindow* window = cocoa_helper_.window();
« no previous file with comments | « chrome/browser/cocoa/tab_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698