| Index: services/ui/ws/event_dispatcher_unittest.cc
|
| diff --git a/services/ui/ws/event_dispatcher_unittest.cc b/services/ui/ws/event_dispatcher_unittest.cc
|
| index 5e059270eade0ffd818bcdecf53f073ac47c0861..fde7de8efec778070ccb1f848d3fddfcb79d6ed3 100644
|
| --- a/services/ui/ws/event_dispatcher_unittest.cc
|
| +++ b/services/ui/ws/event_dispatcher_unittest.cc
|
| @@ -337,8 +337,8 @@ void EventDispatcherTest::SetUp() {
|
| TEST_F(EventDispatcherTest, ProcessEvent) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| // Send event that is over child.
|
| const ui::PointerEvent ui_event(ui::MouseEvent(
|
| @@ -550,8 +550,8 @@ TEST_F(EventDispatcherTest, Capture) {
|
| ServerWindow* root = root_window();
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| MouseEventTest tests[] = {
|
| // Send a mouse down event over child.
|
| @@ -592,8 +592,8 @@ TEST_F(EventDispatcherTest, Capture) {
|
| TEST_F(EventDispatcherTest, CaptureMultipleMouseButtons) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| MouseEventTest tests[] = {
|
| // Send a mouse down event over child with a left mouse button
|
| @@ -635,8 +635,8 @@ TEST_F(EventDispatcherTest, CaptureMultipleMouseButtons) {
|
| TEST_F(EventDispatcherTest, ClientAreaGoesToOwner) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| child->SetClientArea(gfx::Insets(5, 5, 5, 5), std::vector<gfx::Rect>());
|
|
|
| @@ -708,8 +708,8 @@ TEST_F(EventDispatcherTest, ClientAreaGoesToOwner) {
|
| TEST_F(EventDispatcherTest, AdditionalClientArea) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| std::vector<gfx::Rect> additional_client_areas;
|
| additional_client_areas.push_back(gfx::Rect(18, 0, 2, 2));
|
| @@ -735,8 +735,8 @@ TEST_F(EventDispatcherTest, AdditionalClientArea) {
|
| TEST_F(EventDispatcherTest, HitTestMask) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
| child->SetHitTestMask(gfx::Rect(2, 2, 16, 16));
|
|
|
| // Move in the masked area.
|
| @@ -777,9 +777,9 @@ TEST_F(EventDispatcherTest, DontFocusOnSecondDown) {
|
| std::unique_ptr<ServerWindow> child1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> child2 = CreateChildWindow(WindowId(1, 4));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child1->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| - child2->SetBounds(gfx::Rect(50, 51, 11, 12));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child1->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
| + child2->SetBounds(gfx::Rect(50, 51, 11, 12), cc::LocalFrameId());
|
|
|
| TestEventDispatcherDelegate* event_dispatcher_delegate =
|
| test_event_dispatcher_delegate();
|
| @@ -814,9 +814,9 @@ TEST_F(EventDispatcherTest, TwoPointersActive) {
|
| std::unique_ptr<ServerWindow> child1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> child2 = CreateChildWindow(WindowId(1, 4));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child1->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| - child2->SetBounds(gfx::Rect(50, 51, 11, 12));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child1->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
| + child2->SetBounds(gfx::Rect(50, 51, 11, 12), cc::LocalFrameId());
|
|
|
| TestEventDispatcherDelegate* event_dispatcher_delegate =
|
| test_event_dispatcher_delegate();
|
| @@ -879,8 +879,8 @@ TEST_F(EventDispatcherTest, TwoPointersActive) {
|
| TEST_F(EventDispatcherTest, DestroyWindowWhileGettingEvents) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| TestEventDispatcherDelegate* event_dispatcher_delegate =
|
| test_event_dispatcher_delegate();
|
| @@ -911,8 +911,8 @@ TEST_F(EventDispatcherTest, MouseInExtendedHitTestRegion) {
|
| ServerWindow* root = root_window();
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| TestEventDispatcherDelegate* event_dispatcher_delegate =
|
| test_event_dispatcher_delegate();
|
| @@ -963,9 +963,9 @@ TEST_F(EventDispatcherTest, WheelWhileDown) {
|
| std::unique_ptr<ServerWindow> child1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> child2 = CreateChildWindow(WindowId(1, 4));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child1->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| - child2->SetBounds(gfx::Rect(50, 51, 11, 12));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child1->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
| + child2->SetBounds(gfx::Rect(50, 51, 11, 12), cc::LocalFrameId());
|
|
|
| MouseEventTest tests[] = {
|
| // Send a mouse down event over child1.
|
| @@ -992,8 +992,8 @@ TEST_F(EventDispatcherTest, SetExplicitCapture) {
|
| ServerWindow* root = root_window();
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| TestEventDispatcherDelegate* event_dispatcher_delegate =
|
| test_event_dispatcher_delegate();
|
| @@ -1093,8 +1093,8 @@ TEST_F(EventDispatcherTest, ExplicitCaptureOverridesImplicitCapture) {
|
| ServerWindow* root = root_window();
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| TestEventDispatcherDelegate* event_dispatcher_delegate =
|
| test_event_dispatcher_delegate();
|
| @@ -1181,7 +1181,7 @@ TEST_F(EventDispatcherTest, ExplicitCaptureOverridesImplicitCapture) {
|
| // window.
|
| TEST_F(EventDispatcherTest, CaptureUpdatesActivePointerTargets) {
|
| ServerWindow* root = root_window();
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
|
|
| EventDispatcher* dispatcher = event_dispatcher();
|
| {
|
| @@ -1220,9 +1220,9 @@ TEST_F(EventDispatcherTest, UpdatingCaptureStopsObservingPreviousCapture) {
|
| std::unique_ptr<ServerWindow> child1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> child2 = CreateChildWindow(WindowId(1, 4));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child1->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| - child2->SetBounds(gfx::Rect(50, 51, 11, 12));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child1->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
| + child2->SetBounds(gfx::Rect(50, 51, 11, 12), cc::LocalFrameId());
|
|
|
| EventDispatcher* dispatcher = event_dispatcher();
|
| ASSERT_FALSE(AreAnyPointersDown());
|
| @@ -1241,7 +1241,7 @@ TEST_F(EventDispatcherTest, UpdatingCaptureStopsObservingPreviousCapture) {
|
| // state.
|
| TEST_F(EventDispatcherTest, DestroyingCaptureWindowRemovesExplicitCapture) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| EventDispatcher* dispatcher = event_dispatcher();
|
| dispatcher->SetCaptureWindow(child.get(), kClientAreaId);
|
| @@ -1258,7 +1258,7 @@ TEST_F(EventDispatcherTest, DestroyingCaptureWindowRemovesExplicitCapture) {
|
| // preference is used regardless of whether an event targets the client region.
|
| TEST_F(EventDispatcherTest, CaptureInNonClientAreaOverridesActualPoint) {
|
| ServerWindow* root = root_window();
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
|
|
| root->SetClientArea(gfx::Insets(5, 5, 5, 5), std::vector<gfx::Rect>());
|
| EventDispatcher* dispatcher = event_dispatcher();
|
| @@ -1284,8 +1284,8 @@ TEST_F(EventDispatcherTest, CaptureInNonClientAreaOverridesActualPoint) {
|
| TEST_F(EventDispatcherTest, ProcessPointerEvents) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| {
|
| const ui::PointerEvent pointer_event(ui::MouseEvent(
|
| @@ -1333,8 +1333,8 @@ TEST_F(EventDispatcherTest, ProcessPointerEvents) {
|
| TEST_F(EventDispatcherTest, ResetClearsPointerDown) {
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| // Send event that is over child.
|
| const ui::PointerEvent ui_event(ui::MouseEvent(
|
| @@ -1357,7 +1357,7 @@ TEST_F(EventDispatcherTest, ResetClearsPointerDown) {
|
|
|
| TEST_F(EventDispatcherTest, ResetClearsCapture) {
|
| ServerWindow* root = root_window();
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
|
|
| root->SetClientArea(gfx::Insets(5, 5, 5, 5), std::vector<gfx::Rect>());
|
| EventDispatcher* dispatcher = event_dispatcher();
|
| @@ -1373,9 +1373,9 @@ TEST_F(EventDispatcherTest, ModalWindowEventOnModalParent) {
|
| std::unique_ptr<ServerWindow> w1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 5));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
|
|
| w1->AddTransientWindow(w2.get());
|
| w2->SetModal();
|
| @@ -1406,9 +1406,9 @@ TEST_F(EventDispatcherTest, ModalWindowEventOnModalChild) {
|
| std::unique_ptr<ServerWindow> w1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 5));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
|
|
| w1->AddTransientWindow(w2.get());
|
| w2->SetModal();
|
| @@ -1441,10 +1441,10 @@ TEST_F(EventDispatcherTest, ModalWindowEventOnUnrelatedWindow) {
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 5));
|
| std::unique_ptr<ServerWindow> w3 = CreateChildWindow(WindowId(1, 6));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| - w3->SetBounds(gfx::Rect(70, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
| + w3->SetBounds(gfx::Rect(70, 10, 10, 10), cc::LocalFrameId());
|
|
|
| w1->AddTransientWindow(w2.get());
|
| w2->SetModal();
|
| @@ -1478,10 +1478,10 @@ TEST_F(EventDispatcherTest, ModalWindowEventOnDescendantOfModalParent) {
|
| CreateChildWindowWithParent(WindowId(1, 4), w1.get());
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 5));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w11->SetBounds(gfx::Rect(10, 10, 10, 10));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w11->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
|
|
| w1->AddTransientWindow(w2.get());
|
| w2->SetModal();
|
| @@ -1511,8 +1511,8 @@ TEST_F(EventDispatcherTest, ModalWindowEventOnDescendantOfModalParent) {
|
| TEST_F(EventDispatcherTest, ModalWindowEventOnSystemModal) {
|
| std::unique_ptr<ServerWindow> w1 = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| w1->SetModal();
|
|
|
| // Send event that is over |w1|.
|
| @@ -1540,8 +1540,8 @@ TEST_F(EventDispatcherTest, ModalWindowEventOnSystemModal) {
|
| TEST_F(EventDispatcherTest, ModalWindowEventOutsideSystemModal) {
|
| std::unique_ptr<ServerWindow> w1 = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| w1->SetModal();
|
| event_dispatcher()->AddSystemModalWindow(w1.get());
|
|
|
| @@ -1573,10 +1573,10 @@ TEST_F(EventDispatcherTest, ModalWindowSetCaptureDescendantOfModalParent) {
|
| CreateChildWindowWithParent(WindowId(1, 4), w1.get());
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 5));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w11->SetBounds(gfx::Rect(10, 10, 10, 10));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w11->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
|
|
| w1->AddTransientWindow(w2.get());
|
| w2->SetModal();
|
| @@ -1591,10 +1591,10 @@ TEST_F(EventDispatcherTest, ModalWindowSetCaptureUnrelatedWindow) {
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 4));
|
| std::unique_ptr<ServerWindow> w3 = CreateChildWindow(WindowId(1, 5));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| - w3->SetBounds(gfx::Rect(70, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
| + w3->SetBounds(gfx::Rect(70, 10, 10, 10), cc::LocalFrameId());
|
|
|
| w1->AddTransientWindow(w2.get());
|
| w2->SetModal();
|
| @@ -1608,9 +1608,9 @@ TEST_F(EventDispatcherTest, ModalWindowSystemSetCapture) {
|
| std::unique_ptr<ServerWindow> w1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 4));
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(10, 10, 30, 30));
|
| - w2->SetBounds(gfx::Rect(50, 10, 10, 10));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
|
|
|
| event_dispatcher()->AddSystemModalWindow(w2.get());
|
|
|
| @@ -1669,10 +1669,10 @@ TEST_F(EventDispatcherTest, CaptureNotResetOnParentChange) {
|
| std::unique_ptr<ServerWindow> w2 = CreateChildWindow(WindowId(1, 5));
|
| DisableHitTest(w2.get());
|
|
|
| - root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w1->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - w11->SetBounds(gfx::Rect(10, 10, 10, 10));
|
| - w2->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| + root_window()->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w1->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + w11->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
|
| + w2->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
|
|
| // Send event that is over |w11|.
|
| const ui::PointerEvent mouse_pressed(ui::MouseEvent(
|
| @@ -1716,8 +1716,8 @@ TEST_F(EventDispatcherTest, MoveMouseFromNoTargetToValidTarget) {
|
| DisableHitTest(root);
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| MouseEventTest tests[] = {
|
| // Send a mouse down over the root, but not the child. No event should
|
| @@ -1741,8 +1741,8 @@ TEST_F(EventDispatcherTest, NoTargetToTargetWithMouseDown) {
|
| DisableHitTest(root);
|
| std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - child->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + child->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
|
|
| MouseEventTest tests[] = {
|
| // Mouse over the root, but not the child. No event should be generated.
|
| @@ -1774,9 +1774,9 @@ TEST_F(EventDispatcherTest, DontSendExitToSameClientWhenCaptureChanges) {
|
| std::unique_ptr<ServerWindow> c1 = CreateChildWindow(WindowId(1, 3));
|
| std::unique_ptr<ServerWindow> c2 = CreateChildWindow(WindowId(1, 4));
|
|
|
| - root->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| - c1->SetBounds(gfx::Rect(10, 10, 20, 20));
|
| - c2->SetBounds(gfx::Rect(15, 15, 20, 20));
|
| + root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
|
| + c1->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
|
| + c2->SetBounds(gfx::Rect(15, 15, 20, 20), cc::LocalFrameId());
|
|
|
| MouseEventTest tests[] = {
|
| // Mouse over |c2|.
|
|
|