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

Side by Side Diff: ui/views/corewm/capture_controller_unittest.cc

Issue 128753002: Remove SetHostSize/Bounds from RootWindow in favor of just calling SetBounds() on host() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: weirdness Created 6 years, 11 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/views/corewm/capture_controller.h" 5 #include "ui/views/corewm/capture_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/env.h" 8 #include "ui/aura/env.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/aura/test/aura_test_base.h" 10 #include "ui/aura/test/aura_test_base.h"
(...skipping 20 matching lines...) Expand all
31 CaptureControllerTest() {} 31 CaptureControllerTest() {}
32 32
33 virtual void SetUp() OVERRIDE { 33 virtual void SetUp() OVERRIDE {
34 AuraTestBase::SetUp(); 34 AuraTestBase::SetUp();
35 capture_controller_.reset(new corewm::ScopedCaptureClient(root_window())); 35 capture_controller_.reset(new corewm::ScopedCaptureClient(root_window()));
36 36
37 second_root_.reset(new aura::RootWindow( 37 second_root_.reset(new aura::RootWindow(
38 aura::RootWindow::CreateParams(gfx::Rect(0, 0, 800, 600)))); 38 aura::RootWindow::CreateParams(gfx::Rect(0, 0, 800, 600))));
39 second_root_->Init(); 39 second_root_->Init();
40 second_root_->window()->Show(); 40 second_root_->window()->Show();
41 second_root_->SetHostSize(gfx::Size(800, 600)); 41 second_root_->host()->SetBounds(gfx::Rect(800, 600));
42 second_capture_controller_.reset( 42 second_capture_controller_.reset(
43 new corewm::ScopedCaptureClient(second_root_->window())); 43 new corewm::ScopedCaptureClient(second_root_->window()));
44 44
45 #if !defined(OS_CHROMEOS) 45 #if !defined(OS_CHROMEOS)
46 desktop_position_client_.reset(new DesktopScreenPositionClient()); 46 desktop_position_client_.reset(new DesktopScreenPositionClient());
47 aura::client::SetScreenPositionClient(root_window(), 47 aura::client::SetScreenPositionClient(root_window(),
48 desktop_position_client_.get()); 48 desktop_position_client_.get());
49 49
50 second_desktop_position_client_.reset(new DesktopScreenPositionClient()); 50 second_desktop_position_client_.reset(new DesktopScreenPositionClient());
51 aura::client::SetScreenPositionClient( 51 aura::client::SetScreenPositionClient(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetCaptureWindow()); 163 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetCaptureWindow());
164 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetSecondCaptureWindow()); 164 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetSecondCaptureWindow());
165 ui::TouchEvent touch_event( 165 ui::TouchEvent touch_event(
166 ui::ET_TOUCH_PRESSED, gfx::Point(), 0, 0, ui::EventTimeForNow(), 1.0f, 166 ui::ET_TOUCH_PRESSED, gfx::Point(), 0, 0, ui::EventTimeForNow(), 1.0f,
167 1.0f, 1.0f, 1.0f); 167 1.0f, 1.0f, 1.0f);
168 EXPECT_EQ(static_cast<ui::GestureConsumer*>(w2.get()), 168 EXPECT_EQ(static_cast<ui::GestureConsumer*>(w2.get()),
169 ui::GestureRecognizer::Get()->GetTouchLockedTarget(touch_event)); 169 ui::GestureRecognizer::Get()->GetTouchLockedTarget(touch_event));
170 } 170 }
171 171
172 } // namespace views 172 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/views/corewm/desktop_capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698