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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/cw_alert_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_alert_unittest.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/cw_alert_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/cw_alert_unittest.mm
deleted file mode 100644
index 17842dc4fae825169f53685d69c274afe05a76e3..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/constrained_window/cw_alert_unittest.mm
+++ /dev/null
@@ -1,39 +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 "chrome/browser/ui/cocoa/constrained_window/cw_alert.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-
-class CWAlertTest : public CocoaTest {
-};
-
-TEST_F(CWAlertTest, Show) {
- scoped_nsobject<CWAlert> alert([[CWAlert alloc] init]);
- EXPECT_TRUE([alert window]);
- EXPECT_TRUE([alert closeButton]);
-
- [alert setMessageText:@"Message text"];
- [alert setInformativeText:@"Informative text"];
- [alert addButtonWithTitle:@"OK" keyEquivalent:@""];
- [alert addButtonWithTitle:@"Cancel" keyEquivalent:@""];
-
- [alert layout];
- [[alert window] makeKeyAndOrderFront:nil];
-}
-
-TEST_F(CWAlertTest, AccessoryView) {
- scoped_nsobject<CWAlert> alert([[CWAlert alloc] init]);
- EXPECT_FALSE([alert accessoryView]);
-
- NSRect view_rect = NSMakeRect(0, 0, 700, 300);
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:view_rect]);
- [alert setAccessoryView:view];
-
- [alert layout];
- NSRect window_rect = [[alert window] frame];
- EXPECT_GT(NSWidth(window_rect), NSWidth(view_rect));
- EXPECT_GT(NSHeight(window_rect), NSHeight(view_rect));
-
- [[alert window] makeKeyAndOrderFront:nil];
-}
« no previous file with comments | « chrome/browser/ui/cocoa/constrained_window/cw_alert.mm ('k') | chrome/browser/ui/cocoa/constrained_window/cw_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698