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

Side by Side Diff: components/mus/ws/event_dispatcher_unittest.cc

Issue 1419793006: Makes windowmanager draw non-client area (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include Created 5 years, 1 month 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
« no previous file with comments | « components/mus/ws/event_dispatcher.cc ('k') | components/mus/ws/server_window.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/ws/event_dispatcher.h" 5 #include "components/mus/ws/event_dispatcher.h"
6 6
7 #include "components/mus/public/cpp/event_matcher.h" 7 #include "components/mus/public/cpp/event_matcher.h"
8 #include "components/mus/ws/event_dispatcher_delegate.h" 8 #include "components/mus/ws/event_dispatcher_delegate.h"
9 #include "components/mus/ws/server_window.h" 9 #include "components/mus/ws/server_window.h"
10 #include "components/mus/ws/test_server_window_delegate.h" 10 #include "components/mus/ws/test_server_window_delegate.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 window_delegate.set_root_window(&root); 296 window_delegate.set_root_window(&root);
297 root.SetVisible(true); 297 root.SetVisible(true);
298 298
299 ServerWindow child(&window_delegate, WindowId(1, 3)); 299 ServerWindow child(&window_delegate, WindowId(1, 3));
300 root.Add(&child); 300 root.Add(&child);
301 child.SetVisible(true); 301 child.SetVisible(true);
302 302
303 root.SetBounds(gfx::Rect(0, 0, 100, 100)); 303 root.SetBounds(gfx::Rect(0, 0, 100, 100));
304 child.SetBounds(gfx::Rect(10, 10, 20, 20)); 304 child.SetBounds(gfx::Rect(10, 10, 20, 20));
305 305
306 child.SetClientArea(gfx::Rect(5, 5, 10, 10)); 306 child.SetClientArea(gfx::Insets(5, 5, 5, 5));
307 307
308 TestEventDispatcherDelegate event_dispatcher_delegate(&root); 308 TestEventDispatcherDelegate event_dispatcher_delegate(&root);
309 EventDispatcher dispatcher(&event_dispatcher_delegate); 309 EventDispatcher dispatcher(&event_dispatcher_delegate);
310 dispatcher.set_root(&root); 310 dispatcher.set_root(&root);
311 311
312 // Start move loop by sending mouse event over non-client area. 312 // Start move loop by sending mouse event over non-client area.
313 const ui::MouseEvent press_event( 313 const ui::MouseEvent press_event(
314 ui::ET_MOUSE_PRESSED, gfx::Point(12, 12), gfx::Point(12, 12), 314 ui::ET_MOUSE_PRESSED, gfx::Point(12, 12), gfx::Point(12, 12),
315 base::TimeDelta(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); 315 base::TimeDelta(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
316 dispatcher.OnEvent( 316 dispatcher.OnEvent(
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 base::TimeDelta()); 495 base::TimeDelta());
496 dispatcher.OnEvent( 496 dispatcher.OnEvent(
497 mojom::Event::From(static_cast<const ui::Event&>(drag_event1))); 497 mojom::Event::From(static_cast<const ui::Event&>(drag_event1)));
498 EXPECT_EQ(nullptr, event_dispatcher_delegate.GetAndClearLastTarget()); 498 EXPECT_EQ(nullptr, event_dispatcher_delegate.GetAndClearLastTarget());
499 EXPECT_EQ(nullptr, 499 EXPECT_EQ(nullptr,
500 event_dispatcher_delegate.GetAndClearLastDispatchedEvent().get()); 500 event_dispatcher_delegate.GetAndClearLastDispatchedEvent().get());
501 } 501 }
502 502
503 } // namespace ws 503 } // namespace ws
504 } // namespace mus 504 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/event_dispatcher.cc ('k') | components/mus/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698