| 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/cocoa/browser_test_helper.h" | 10 #include "chrome/browser/ui/cocoa/browser_test_helper.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/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
| 14 #include "content/browser/renderer_host/test_render_view_host.h" | 14 #include "content/browser/renderer_host/test_render_view_host.h" |
| 15 #import "third_party/ocmock/OCMock/OCMock.h" | |
| 16 | 15 |
| 17 // Subclass balloon controller and mock out the initialization of the RVH. | 16 // Subclass balloon controller and mock out the initialization of the RVH. |
| 18 @interface TestBalloonController : BalloonController { | 17 @interface TestBalloonController : BalloonController { |
| 19 } | 18 } |
| 20 - (void)initializeHost; | 19 - (void)initializeHost; |
| 21 @end | 20 @end |
| 22 | 21 |
| 23 @implementation TestBalloonController | 22 @implementation TestBalloonController |
| 24 - (void)initializeHost {} | 23 - (void)initializeHost {} |
| 25 @end | 24 @end |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 104 |
| 106 [controller showWindow:nil]; | 105 [controller showWindow:nil]; |
| 107 | 106 |
| 108 EXPECT_TRUE([controller desiredTotalWidth] > 100); | 107 EXPECT_TRUE([controller desiredTotalWidth] > 100); |
| 109 EXPECT_TRUE([controller desiredTotalHeight] > 100); | 108 EXPECT_TRUE([controller desiredTotalHeight] > 100); |
| 110 | 109 |
| 111 [controller closeBalloon:YES]; | 110 [controller closeBalloon:YES]; |
| 112 } | 111 } |
| 113 | 112 |
| 114 } | 113 } |
| OLD | NEW |