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

Side by Side Diff: ui/message_center/views/message_popup_collection_unittest.cc

Issue 19291004: Observes work area change and auto-hide for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/message_center/views/message_popup_collection.h" 5 #include "ui/message_center/views/message_popup_collection.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 11 matching lines...) Expand all
22 class MessagePopupCollectionTest : public views::ViewsTestBase { 22 class MessagePopupCollectionTest : public views::ViewsTestBase {
23 public: 23 public:
24 virtual void SetUp() OVERRIDE { 24 virtual void SetUp() OVERRIDE {
25 views::ViewsTestBase::SetUp(); 25 views::ViewsTestBase::SetUp();
26 MessageCenter::Initialize(); 26 MessageCenter::Initialize();
27 collection_.reset( 27 collection_.reset(
28 new MessagePopupCollection(GetContext(), MessageCenter::Get(), NULL)); 28 new MessagePopupCollection(GetContext(), MessageCenter::Get(), NULL));
29 // This size fits test machines resolution and also can keep a few toasts 29 // This size fits test machines resolution and also can keep a few toasts
30 // w/o ill effects of hitting the screen overflow. This allows us to assume 30 // w/o ill effects of hitting the screen overflow. This allows us to assume
31 // and verify normal layout of the toast stack. 31 // and verify normal layout of the toast stack.
32 collection_->SetWorkAreaForTest(gfx::Rect(0, 0, 600, 400)); 32 collection_->SetWorkArea(gfx::Rect(0, 0, 600, 400));
33 id_ = 0; 33 id_ = 0;
34 } 34 }
35 35
36 virtual void TearDown() OVERRIDE { 36 virtual void TearDown() OVERRIDE {
37 collection_->CloseAllWidgets(); 37 collection_->CloseAllWidgets();
38 collection_.reset(); 38 collection_.reset();
39 MessageCenter::Shutdown(); 39 MessageCenter::Shutdown();
40 views::ViewsTestBase::TearDown(); 40 views::ViewsTestBase::TearDown();
41 } 41 }
42 42
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 CloseAllToastsAndWait(); 175 CloseAllToastsAndWait();
176 EXPECT_EQ(0u, GetToastCounts()); 176 EXPECT_EQ(0u, GetToastCounts());
177 } 177 }
178 178
179 // TODO(dimich): Test repositioning - both normal one and when user is closing 179 // TODO(dimich): Test repositioning - both normal one and when user is closing
180 // the toasts. 180 // the toasts.
181 181
182 } // namespace test 182 } // namespace test
183 } // namespace message_center 183 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698