OLD | NEW |
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 #include "base/memory/scoped_nsobject.h" | 5 #include "base/memory/scoped_nsobject.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/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/notifications/notification_object_proxy.h" | 10 #include "chrome/browser/notifications/notification_object_proxy.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 private: | 53 private: |
54 Balloons balloons_; | 54 Balloons balloons_; |
55 }; | 55 }; |
56 | 56 |
57 class BalloonControllerTest : public ChromeRenderViewHostTestHarness { | 57 class BalloonControllerTest : public ChromeRenderViewHostTestHarness { |
58 virtual void SetUp() OVERRIDE { | 58 virtual void SetUp() OVERRIDE { |
59 ChromeRenderViewHostTestHarness::SetUp(); | 59 ChromeRenderViewHostTestHarness::SetUp(); |
60 CocoaTest::BootstrapCocoa(); | 60 CocoaTest::BootstrapCocoa(); |
61 profile()->CreateRequestContext(); | 61 profile()->CreateRequestContext(); |
62 Browser::CreateParams native_params(profile(), | 62 Browser::CreateParams native_params(profile(), chrome::GetActiveDesktop()); |
63 chrome::HOST_DESKTOP_TYPE_NATIVE); | |
64 browser_.reset( | 63 browser_.reset( |
65 chrome::CreateBrowserWithTestWindowForParams(&native_params)); | 64 chrome::CreateBrowserWithTestWindowForParams(&native_params)); |
66 collection_.reset(new MockBalloonCollection()); | 65 collection_.reset(new MockBalloonCollection()); |
67 } | 66 } |
68 | 67 |
69 virtual void TearDown() OVERRIDE { | 68 virtual void TearDown() OVERRIDE { |
70 collection_.reset(); | 69 collection_.reset(); |
71 browser_.reset(); | 70 browser_.reset(); |
72 ChromeRenderViewHostTestHarness::TearDown(); | 71 ChromeRenderViewHostTestHarness::TearDown(); |
73 } | 72 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 106 |
108 [controller showWindow:nil]; | 107 [controller showWindow:nil]; |
109 | 108 |
110 EXPECT_TRUE([controller desiredTotalWidth] > 100); | 109 EXPECT_TRUE([controller desiredTotalWidth] > 100); |
111 EXPECT_TRUE([controller desiredTotalHeight] > 100); | 110 EXPECT_TRUE([controller desiredTotalHeight] > 100); |
112 | 111 |
113 [controller closeBalloon:YES]; | 112 [controller closeBalloon:YES]; |
114 } | 113 } |
115 | 114 |
116 } | 115 } |
OLD | NEW |