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

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

Issue 489763002: MacViews: Gets a webview working in views_examples_with_content_exe Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to master Created 6 years, 3 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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 13 matching lines...) Expand all
24 namespace message_center { 24 namespace message_center {
25 namespace test { 25 namespace test {
26 26
27 class MessagePopupCollectionTest : public views::ViewsTestBase { 27 class MessagePopupCollectionTest : public views::ViewsTestBase {
28 public: 28 public:
29 virtual void SetUp() OVERRIDE { 29 virtual void SetUp() OVERRIDE {
30 views::ViewsTestBase::SetUp(); 30 views::ViewsTestBase::SetUp();
31 MessageCenter::Initialize(); 31 MessageCenter::Initialize();
32 MessageCenter::Get()->DisableTimersForTest(); 32 MessageCenter::Get()->DisableTimersForTest();
33 alignment_delegate_.reset(new DesktopPopupAlignmentDelegate); 33 alignment_delegate_.reset(new DesktopPopupAlignmentDelegate);
34
35 gfx::NativeView parent = NULL;
36 #if defined(USE_ASH)
37 // On ChromeOS the parent is a special container window. In tests, provide
38 // the root window instead. Note on a Windows ash build the parent is later
39 // NULLed out, because the message center is managed in desktop mode only.
40 parent = GetContext();
41 #endif
34 collection_.reset(new MessagePopupCollection( 42 collection_.reset(new MessagePopupCollection(
35 GetContext(), MessageCenter::Get(), NULL, alignment_delegate_.get())); 43 parent, MessageCenter::Get(), NULL, alignment_delegate_.get()));
36 // This size fits test machines resolution and also can keep a few toasts 44 // This size fits test machines resolution and also can keep a few toasts
37 // w/o ill effects of hitting the screen overflow. This allows us to assume 45 // w/o ill effects of hitting the screen overflow. This allows us to assume
38 // and verify normal layout of the toast stack. 46 // and verify normal layout of the toast stack.
39 SetDisplayInfo(gfx::Rect(0, 0, 600, 390), // taskbar at the bottom. 47 SetDisplayInfo(gfx::Rect(0, 0, 600, 390), // taskbar at the bottom.
40 gfx::Rect(0, 0, 600, 400)); 48 gfx::Rect(0, 0, 600, 400));
41 id_ = 0; 49 id_ = 0;
42 PrepareForWait(); 50 PrepareForWait();
43 } 51 }
44 52
45 virtual void TearDown() OVERRIDE { 53 virtual void TearDown() OVERRIDE {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 std::string id2 = AddNotification(); 420 std::string id2 = AddNotification();
413 421
414 WaitForTransitionsDone(); 422 WaitForTransitionsDone();
415 views::WidgetDelegateView* toast2 = GetToast(id2); 423 views::WidgetDelegateView* toast2 = GetToast(id2);
416 EXPECT_TRUE(toast2 != NULL); 424 EXPECT_TRUE(toast2 != NULL);
417 } 425 }
418 426
419 427
420 } // namespace test 428 } // namespace test
421 } // namespace message_center 429 } // namespace message_center
OLDNEW
« no previous file with comments | « content/shell/browser/shell_web_contents_view_delegate_win.cc ('k') | ui/views/controls/native/native_view_host_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698