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

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

Issue 196063002: Move wm/core to wm namespace. (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) 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/event_generator.h" 9 #include "ui/aura/test/event_generator.h"
10 #include "ui/aura/test/test_window_delegate.h" 10 #include "ui/aura/test/test_window_delegate.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // The test case creates two visible widgets and sets capture to the underlying 88 // The test case creates two visible widgets and sets capture to the underlying
89 // aura::Windows one by one. It then sends a gesture event and validates whether 89 // aura::Windows one by one. It then sends a gesture event and validates whether
90 // the window which had capture receives the gesture. 90 // the window which had capture receives the gesture.
91 // TODO(sky): move this test, it should be part of ScopedCaptureClient tests. 91 // TODO(sky): move this test, it should be part of ScopedCaptureClient tests.
92 TEST_F(DesktopCaptureControllerTest, CaptureWindowInputEventTest) { 92 TEST_F(DesktopCaptureControllerTest, CaptureWindowInputEventTest) {
93 scoped_ptr<aura::client::ScreenPositionClient> desktop_position_client1; 93 scoped_ptr<aura::client::ScreenPositionClient> desktop_position_client1;
94 scoped_ptr<aura::client::ScreenPositionClient> desktop_position_client2; 94 scoped_ptr<aura::client::ScreenPositionClient> desktop_position_client2;
95 95
96 scoped_ptr<Widget> widget1(new Widget()); 96 scoped_ptr<Widget> widget1(new Widget());
97 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); 97 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
98 scoped_ptr<corewm::ScopedCaptureClient> scoped_capture_client( 98 scoped_ptr<wm::ScopedCaptureClient> scoped_capture_client(
99 new corewm::ScopedCaptureClient(params.context->GetRootWindow())); 99 new wm::ScopedCaptureClient(params.context->GetRootWindow()));
100 aura::client::CaptureClient* capture_client = 100 aura::client::CaptureClient* capture_client =
101 scoped_capture_client->capture_client(); 101 scoped_capture_client->capture_client();
102 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 102 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
103 params.bounds = gfx::Rect(50, 50, 650, 650); 103 params.bounds = gfx::Rect(50, 50, 650, 650);
104 widget1->Init(params); 104 widget1->Init(params);
105 internal::RootView* root1 = 105 internal::RootView* root1 =
106 static_cast<internal::RootView*>(widget1->GetRootView()); 106 static_cast<internal::RootView*>(widget1->GetRootView());
107 107
108 desktop_position_client1.reset( 108 desktop_position_client1.reset(
109 new DesktopScreenPositionClient(params.context->GetRootWindow())); 109 new DesktopScreenPositionClient(params.context->GetRootWindow()));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 EXPECT_TRUE(v2->received_gesture_event()); 173 EXPECT_TRUE(v2->received_gesture_event());
174 EXPECT_FALSE(v1->received_gesture_event()); 174 EXPECT_FALSE(v1->received_gesture_event());
175 175
176 widget1->CloseNow(); 176 widget1->CloseNow();
177 widget2->CloseNow(); 177 widget2->CloseNow();
178 RunPendingMessages(); 178 RunPendingMessages();
179 } 179 }
180 180
181 } // namespace views 181 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/capture_controller_unittest.cc ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698