OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_nsobject.h" | 5 #include "base/memory/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/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 11 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
12 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" | 12 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" |
13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
15 #include "content/test/test_browser_thread.h" | 15 #include "content/public/test/test_browser_thread.h" |
16 | 16 |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 | 18 |
19 // Subclass balloon controller and mock out the initialization of the RVH. | 19 // Subclass balloon controller and mock out the initialization of the RVH. |
20 @interface TestBalloonController : BalloonController { | 20 @interface TestBalloonController : BalloonController { |
21 } | 21 } |
22 - (void)initializeHost; | 22 - (void)initializeHost; |
23 @end | 23 @end |
24 | 24 |
25 @implementation TestBalloonController | 25 @implementation TestBalloonController |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 [controller showWindow:nil]; | 111 [controller showWindow:nil]; |
112 | 112 |
113 EXPECT_TRUE([controller desiredTotalWidth] > 100); | 113 EXPECT_TRUE([controller desiredTotalWidth] > 100); |
114 EXPECT_TRUE([controller desiredTotalHeight] > 100); | 114 EXPECT_TRUE([controller desiredTotalHeight] > 100); |
115 | 115 |
116 [controller closeBalloon:YES]; | 116 [controller closeBalloon:YES]; |
117 } | 117 } |
118 | 118 |
119 } | 119 } |
OLD | NEW |