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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm

Issue 12279015: Mac Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h" 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h"
6 6
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
9 #import "testing/gtest_mac.h" 9 #import "testing/gtest_mac.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 - (void)alertDidEnd:(NSAlert *)alert 59 - (void)alertDidEnd:(NSAlert *)alert
60 returnCode:(NSInteger)returnCode 60 returnCode:(NSInteger)returnCode
61 ctxInfo:(void *)contextInfo { 61 ctxInfo:(void *)contextInfo {
62 returnCode_ = returnCode; 62 returnCode_ = returnCode;
63 } 63 }
64 64
65 @end 65 @end
66 66
67 class ConstrainedWindowSheetControllerTest : public CocoaTest { 67 class ConstrainedWindowSheetControllerTest : public CocoaTest {
68 protected: 68 protected:
69 ~ConstrainedWindowSheetControllerTest() { 69 virtual ~ConstrainedWindowSheetControllerTest() {
70 } 70 }
71 71
72 virtual void SetUp() OVERRIDE { 72 virtual void SetUp() OVERRIDE {
73 CocoaTest::SetUp(); 73 CocoaTest::SetUp();
74 74
75 // Center the window so that the sheet doesn't go offscreen. 75 // Center the window so that the sheet doesn't go offscreen.
76 [test_window() center]; 76 [test_window() center];
77 77
78 // Create two dummy tabs and make the first one active. 78 // Create two dummy tabs and make the first one active.
79 NSRect dummyRect = NSMakeRect(0, 0, 50, 50); 79 NSRect dummyRect = NSMakeRect(0, 0, 50, 50);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 [controller_ showSheet:system_sheet 281 [controller_ showSheet:system_sheet
282 forParentView:tab1_]; 282 forParentView:tab1_];
283 EXPECT_FALSE([[alert window] isVisible]); 283 EXPECT_FALSE([[alert window] isVisible]);
284 284
285 ActivateTabView(tab1_); 285 ActivateTabView(tab1_);
286 EXPECT_TRUE([[alert window] isVisible]); 286 EXPECT_TRUE([[alert window] isVisible]);
287 EXPECT_EQ(1.0, [[alert window] alphaValue]); 287 EXPECT_EQ(1.0, [[alert window] alphaValue]);
288 288
289 [controller_ closeSheet:system_sheet]; 289 [controller_ closeSheet:system_sheet];
290 } 290 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698