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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm

Issue 7610011: Update Sad Tab help text and link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
index 16b54a1d58f8c86002e1c0c97e7b26efe49f2e94..06d62f6878cd367dcc60db3f76612812635edf80 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
@@ -5,6 +5,7 @@
#include "base/debug/debugger.h"
#include "base/memory/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
#import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
#import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h"
#include "chrome/test/base/testing_profile.h"
@@ -13,12 +14,12 @@
@interface SadTabView (ExposedForTesting)
// Implementation is below.
-- (NSButton*)linkButton;
+- (HyperlinkTextView*)helpTextView;
@end
@implementation SadTabView (ExposedForTesting)
-- (NSButton*)linkButton {
- return linkButton_;
+- (HyperlinkTextView*)helpTextView {
+ return help_.get();
}
@end
@@ -62,9 +63,9 @@ class SadTabControllerTest : public RenderViewHostTestHarness {
return controller;
}
- NSButton* GetLinkButton(SadTabController* controller) {
+ HyperlinkTextView* GetHelpTextView(SadTabController* controller) {
SadTabView* view = static_cast<SadTabView*>([controller view]);
- return ([view linkButton]);
+ return ([view helpTextView]);
}
static bool link_clicked_;
@@ -77,24 +78,24 @@ bool SadTabControllerTest::link_clicked_;
TEST_F(SadTabControllerTest, WithTabContents) {
scoped_nsobject<SadTabController> controller(CreateController());
EXPECT_TRUE(controller);
- NSButton* link = GetLinkButton(controller);
- EXPECT_TRUE(link);
+ HyperlinkTextView* help = GetHelpTextView(controller);
+ EXPECT_TRUE(help);
}
TEST_F(SadTabControllerTest, WithoutTabContents) {
DeleteContents();
scoped_nsobject<SadTabController> controller(CreateController());
EXPECT_TRUE(controller);
- NSButton* link = GetLinkButton(controller);
- EXPECT_FALSE(link);
+ HyperlinkTextView* help = GetHelpTextView(controller);
+ EXPECT_FALSE(help);
}
TEST_F(SadTabControllerTest, ClickOnLink) {
scoped_nsobject<SadTabController> controller(CreateController());
- NSButton* link = GetLinkButton(controller);
- EXPECT_TRUE(link);
+ HyperlinkTextView* help = GetHelpTextView(controller);
+ EXPECT_TRUE(help);
EXPECT_FALSE(link_clicked_);
- [link performClick:link];
+ [help clickedOnLink:nil atIndex:0];
EXPECT_TRUE(link_clicked_);
}
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm ('k') | chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698