Chromium Code Reviews| 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(); |