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

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

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 years, 7 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
« no previous file with comments | « ui/views/corewm/DEPS ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/wm/core/capture_controller.h" 5 #include "ui/wm/core/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/test/aura_test_base.h" 9 #include "ui/aura/test/aura_test_base.h"
10 #include "ui/aura/test/event_generator.h" 10 #include "ui/aura/test/event_generator.h"
(...skipping 16 matching lines...) Expand all
27 namespace views { 27 namespace views {
28 28
29 class CaptureControllerTest : public aura::test::AuraTestBase { 29 class CaptureControllerTest : public aura::test::AuraTestBase {
30 public: 30 public:
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 wm::ScopedCaptureClient(root_window())); 35 capture_controller_.reset(new wm::ScopedCaptureClient(root_window()));
36 36
37 second_host_.reset(aura::WindowTreeHost::Create(gfx::Rect(0, 0, 800, 600))); 37 second_host_.reset(aura::WindowTreeHost::Create(gfx::Rect(0, 0, 800, 600),
38 context_factory()));
38 second_host_->InitHost(); 39 second_host_->InitHost();
39 second_host_->window()->Show(); 40 second_host_->window()->Show();
40 second_host_->SetBounds(gfx::Rect(800, 600)); 41 second_host_->SetBounds(gfx::Rect(800, 600));
41 second_capture_controller_.reset( 42 second_capture_controller_.reset(
42 new wm::ScopedCaptureClient(second_host_->window())); 43 new wm::ScopedCaptureClient(second_host_->window()));
43 44
44 #if !defined(OS_CHROMEOS) 45 #if !defined(OS_CHROMEOS)
45 desktop_position_client_.reset( 46 desktop_position_client_.reset(
46 new DesktopScreenPositionClient(root_window())); 47 new DesktopScreenPositionClient(root_window()));
47 48
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetCaptureWindow()); 160 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetCaptureWindow());
160 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetSecondCaptureWindow()); 161 EXPECT_EQ(static_cast<aura::Window*>(NULL), GetSecondCaptureWindow());
161 ui::TouchEvent touch_event( 162 ui::TouchEvent touch_event(
162 ui::ET_TOUCH_PRESSED, gfx::Point(), 0, 0, ui::EventTimeForNow(), 1.0f, 163 ui::ET_TOUCH_PRESSED, gfx::Point(), 0, 0, ui::EventTimeForNow(), 1.0f,
163 1.0f, 1.0f, 1.0f); 164 1.0f, 1.0f, 1.0f);
164 EXPECT_EQ(static_cast<ui::GestureConsumer*>(w2.get()), 165 EXPECT_EQ(static_cast<ui::GestureConsumer*>(w2.get()),
165 ui::GestureRecognizer::Get()->GetTouchLockedTarget(touch_event)); 166 ui::GestureRecognizer::Get()->GetTouchLockedTarget(touch_event));
166 } 167 }
167 168
168 } // namespace views 169 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/DEPS ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698