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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/cw_button_unittest.mm

Issue 10870094: Constrained window sheet controller (test patch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Created 8 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/constrained_window/cw_button_unittest.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/cw_button_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/cw_button_unittest.mm
deleted file mode 100644
index 37c87f21a19999a296a352b52ababa9f58f82a7f..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/constrained_window/cw_button_unittest.mm
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 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.
-
-#import "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/constrained_window/cw_button.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/platform_test.h"
-
-class CWButtonTest : public CocoaTest {
- public:
- CWButtonTest() {
- NSRect frame = NSMakeRect(0, 0, 50, 30);
- button_.reset([[CWButton alloc] initWithFrame:frame]);
- [button_ setTitle:@"Abcdefg"];
- [button_ sizeToFit];
- [[test_window() contentView] addSubview:button_];
- }
-
- protected:
- scoped_nsobject<CWButton> button_;
-};
-
-TEST_VIEW(CWButtonTest, button_)
-
-// Test hover, mostly to ensure nothing leaks or crashes.
-TEST_F(CWButtonTest, DisplayWithHover) {
- [[button_ cell] setIsMouseInside:NO];
- [button_ display];
- [[button_ cell] setIsMouseInside:YES];
- [button_ display];
-}
-
-// Test disabled, mostly to ensure nothing leaks or crashes.
-TEST_F(CWButtonTest, DisplayWithDisable) {
- [button_ setEnabled:YES];
- [button_ display];
- [button_ setEnabled:NO];
- [button_ display];
-}
-
-// Test pushed, mostly to ensure nothing leaks or crashes.
-TEST_F(CWButtonTest, DisplayWithPushed) {
- [[button_ cell] setHighlighted:NO];
- [button_ display];
- [[button_ cell] setHighlighted:YES];
- [button_ display];
-}
-
-// Tracking rects
-TEST_F(CWButtonTest, TrackingRects) {
- CWButtonCell* cell = [button_ cell];
- EXPECT_FALSE([cell isMouseInside]);
-
- [button_ mouseEntered:nil];
- EXPECT_TRUE([cell isMouseInside]);
- [button_ mouseExited:nil];
- EXPECT_FALSE([cell isMouseInside]);
-}
« no previous file with comments | « chrome/browser/ui/cocoa/constrained_window/cw_button.mm ('k') | chrome/browser/ui/cocoa/constrained_window/cw_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698