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

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

Issue 866263008: MacViews: Unify web contents modal dialog types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ValidationMessageBubble
Patch Set: Fix for rsesek Created 5 years, 9 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 - (void)pulseSheet { 50 - (void)pulseSheet {
51 } 51 }
52 52
53 - (void)makeSheetKeyAndOrderFront { 53 - (void)makeSheetKeyAndOrderFront {
54 } 54 }
55 55
56 - (void)updateSheetPosition { 56 - (void)updateSheetPosition {
57 } 57 }
58 58
59 - (NSWindow*)sheetWindow {
60 return [alert_ window];
61 }
62
59 - (void)alertDidEnd:(NSAlert *)alert 63 - (void)alertDidEnd:(NSAlert *)alert
60 returnCode:(NSInteger)returnCode 64 returnCode:(NSInteger)returnCode
61 ctxInfo:(void *)contextInfo { 65 ctxInfo:(void *)contextInfo {
62 returnCode_ = returnCode; 66 returnCode_ = returnCode;
63 } 67 }
64 68
65 @end 69 @end
66 70
67 class ConstrainedWindowSheetControllerTest : public CocoaTest { 71 class ConstrainedWindowSheetControllerTest : public CocoaTest {
68 protected: 72 protected:
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 EXPECT_FALSE([[alert window] isVisible]); 309 EXPECT_FALSE([[alert window] isVisible]);
306 [controller_ showSheet:system_sheet forParentView:tab1_]; 310 [controller_ showSheet:system_sheet forParentView:tab1_];
307 EXPECT_FALSE([[alert window] isVisible]); 311 EXPECT_FALSE([[alert window] isVisible]);
308 312
309 ActivateTabView(tab1_); 313 ActivateTabView(tab1_);
310 EXPECT_TRUE([[alert window] isVisible]); 314 EXPECT_TRUE([[alert window] isVisible]);
311 EXPECT_EQ(1.0, [[alert window] alphaValue]); 315 EXPECT_EQ(1.0, [[alert window] alphaValue]);
312 316
313 [controller_ closeSheet:system_sheet]; 317 [controller_ closeSheet:system_sheet];
314 } 318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698