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

Side by Side Diff: ui/views/widget/native_widget_aura_unittest.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // testing::Test overrides: 40 // testing::Test overrides:
41 virtual void SetUp() OVERRIDE { 41 virtual void SetUp() OVERRIDE {
42 ViewsTestBase::SetUp(); 42 ViewsTestBase::SetUp();
43 dispatcher()->host()->SetBounds(gfx::Rect(640, 480)); 43 dispatcher()->host()->SetBounds(gfx::Rect(640, 480));
44 } 44 }
45 45
46 protected: 46 protected:
47 aura::Window* root_window() { return GetContext(); } 47 aura::Window* root_window() { return GetContext(); }
48 aura::WindowEventDispatcher* dispatcher() { 48 aura::WindowEventDispatcher* dispatcher() {
49 return root_window()->GetDispatcher(); 49 return root_window()->GetHost()->dispatcher();
50 } 50 }
51 51
52 private: 52 private:
53 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAuraTest); 53 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAuraTest);
54 }; 54 };
55 55
56 TEST_F(NativeWidgetAuraTest, CenterWindowLargeParent) { 56 TEST_F(NativeWidgetAuraTest, CenterWindowLargeParent) {
57 // Make a parent window larger than the host represented by 57 // Make a parent window larger than the host represented by
58 // WindowEventDispatcher. 58 // WindowEventDispatcher.
59 scoped_ptr<aura::Window> parent(new aura::Window(NULL)); 59 scoped_ptr<aura::Window> parent(new aura::Window(NULL));
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 delegate->ClearGotMove(); 406 delegate->ClearGotMove();
407 // Simulate a maximize with animation. 407 // Simulate a maximize with animation.
408 delete widget->GetNativeView()->RecreateLayer(); 408 delete widget->GetNativeView()->RecreateLayer();
409 widget->SetBounds(gfx::Rect(0, 0, 500, 500)); 409 widget->SetBounds(gfx::Rect(0, 0, 500, 500));
410 EXPECT_TRUE(delegate->got_move()); 410 EXPECT_TRUE(delegate->got_move());
411 widget->CloseNow(); 411 widget->CloseNow();
412 } 412 }
413 413
414 } // namespace 414 } // namespace
415 } // namespace views 415 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc ('k') | ui/views/widget/tooltip_manager_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698