Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm

Issue 16174003: Make all tests use GetActiveDesktop() instead of hardcoding HOST_DESKTOP_TYPE_NATIVE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698