OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/scoped_nsobject.h" | 5 #include "base/scoped_nsobject.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/notifications/balloon.h" | 7 #include "chrome/browser/notifications/balloon.h" |
8 #include "chrome/browser/notifications/balloon_collection.h" | 8 #include "chrome/browser/notifications/balloon_collection.h" |
9 #include "chrome/browser/notifications/notification.h" | 9 #include "chrome/browser/notifications/notification.h" |
10 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | |
11 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 10 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
12 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 11 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
13 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" | 12 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" |
14 #include "chrome/test/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
| 14 #include "content/browser/renderer_host/test_render_view_host.h" |
15 #import "third_party/ocmock/OCMock/OCMock.h" | 15 #import "third_party/ocmock/OCMock/OCMock.h" |
16 | 16 |
17 // Subclass balloon controller and mock out the initialization of the RVH. | 17 // Subclass balloon controller and mock out the initialization of the RVH. |
18 @interface TestBalloonController : BalloonController { | 18 @interface TestBalloonController : BalloonController { |
19 } | 19 } |
20 - (void)initializeHost; | 20 - (void)initializeHost; |
21 @end | 21 @end |
22 | 22 |
23 @implementation TestBalloonController | 23 @implementation TestBalloonController |
24 - (void)initializeHost {} | 24 - (void)initializeHost {} |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 [controller showWindow:nil]; | 106 [controller showWindow:nil]; |
107 | 107 |
108 EXPECT_TRUE([controller desiredTotalWidth] > 100); | 108 EXPECT_TRUE([controller desiredTotalWidth] > 100); |
109 EXPECT_TRUE([controller desiredTotalHeight] > 100); | 109 EXPECT_TRUE([controller desiredTotalHeight] > 100); |
110 | 110 |
111 [controller closeBalloon:YES]; | 111 [controller closeBalloon:YES]; |
112 } | 112 } |
113 | 113 |
114 } | 114 } |
OLD | NEW |