OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/screen_capture_notification_ui_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 10 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
10 | 11 |
11 @interface ScreenCaptureNotificationController (ExposedForTesting) | 12 @interface ScreenCaptureNotificationController (ExposedForTesting) |
12 - (NSButton*)stopButton; | 13 - (NSButton*)stopButton; |
13 - (NSButton*)minimizeButton; | 14 - (NSButton*)minimizeButton; |
14 @end | 15 @end |
15 | 16 |
16 @implementation ScreenCaptureNotificationController (ExposedForTesting) | 17 @implementation ScreenCaptureNotificationController (ExposedForTesting) |
17 - (NSButton*)stopButton { | 18 - (NSButton*)stopButton { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 new ScreenCaptureNotificationUICocoa(base::UTF8ToUTF16("Title"))); | 116 new ScreenCaptureNotificationUICocoa(base::UTF8ToUTF16("Title"))); |
116 target_->OnStarted( | 117 target_->OnStarted( |
117 base::Bind(&ScreenCaptureNotificationUICocoaTest::StopCallback, | 118 base::Bind(&ScreenCaptureNotificationUICocoaTest::StopCallback, |
118 base::Unretained(this))); | 119 base::Unretained(this))); |
119 | 120 |
120 [[controller() minimizeButton] performClick:nil]; | 121 [[controller() minimizeButton] performClick:nil]; |
121 | 122 |
122 EXPECT_EQ(0, callback_called_); | 123 EXPECT_EQ(0, callback_called_); |
123 EXPECT_TRUE([[controller() window] isMiniaturized]); | 124 EXPECT_TRUE([[controller() window] isMiniaturized]); |
124 } | 125 } |
OLD | NEW |