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

Unified Diff: chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm

Issue 7610011: Update Sad Tab help text and link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use views::GridLayout, address Cocoa comments. 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/hyperlink_text_view_unittest.mm
diff --git a/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm b/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..b5903b2cc5b11e9cd57ae0ff28d6a945be26a46a
--- /dev/null
+++ b/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
+
+namespace {
+
+class HyperlinkTextViewTest : public CocoaTest {
+ public:
+ HyperlinkTextViewTest() {
+ NSRect frame = NSMakeRect(0, 0, 50, 50);
+ scoped_nsobject<HyperlinkTextView> view(
+ [[HyperlinkTextView alloc] initWithFrame:frame]);
+ view_ = view.get();
+ [[test_window() contentView] addSubview:view_];
Nico 2011/09/01 04:12:37 Nevermind, your window keeps a ref to the the view
msw 2011/09/01 16:27:42 Undone.
+ }
+
+ HyperlinkTextView* view_;
Nico 2011/09/01 03:36:03 This won't work. view is only alive in the constru
msw 2011/09/01 16:27:42 Done.
+};
+
+TEST_VIEW(HyperlinkTextViewTest, view_);
+
+TEST_F(HyperlinkTextViewTest, TestViewConfiguration) {
+ EXPECT_FALSE([view_ isEditable]);
+ EXPECT_FALSE([view_ drawsBackground]);
+ EXPECT_FALSE([view_ isHorizontallyResizable]);
+ EXPECT_FALSE([view_ isVerticallyResizable]);
+}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698