Commit d45d21dc authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

aura: update tests failing with MUS

During the conversion to ws2 a handful of aura unittests got an early out.
This adds comments as to why these tests fail with MUS, and updates one to
work with MUS. For the ones I didn't update I didn't feel fixing the test was
worth it, given we get coverage in the LOCAL case.

BUG=866502
TEST=test only changes

Change-Id: If6d1d0bd50c79b727fd9f38c3662312a76ca7d53
Reviewed-on: https://chromium-review.googlesource.com/1256011
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595634}
parent edb517a4
...@@ -64,6 +64,8 @@ class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor, ...@@ -64,6 +64,8 @@ class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor,
WindowEventDispatcher(WindowTreeHost* host, bool are_events_in_pixels); WindowEventDispatcher(WindowTreeHost* host, bool are_events_in_pixels);
~WindowEventDispatcher() override; ~WindowEventDispatcher() override;
bool are_events_in_pixels() const { return are_events_in_pixels_; }
// Stops dispatching/synthesizing mouse events. // Stops dispatching/synthesizing mouse events.
void Shutdown(); void Shutdown();
......
...@@ -1010,9 +1010,6 @@ class HoldPointerOnScrollHandler : public ui::test::TestEventHandler { ...@@ -1010,9 +1010,6 @@ class HoldPointerOnScrollHandler : public ui::test::TestEventHandler {
// Tests that touch-move events don't contribute to an in-progress scroll // Tests that touch-move events don't contribute to an in-progress scroll
// gesture if touch-move events are being held by the dispatcher. // gesture if touch-move events are being held by the dispatcher.
TEST_P(WindowEventDispatcherTest, TouchMovesHeldOnScroll) { TEST_P(WindowEventDispatcherTest, TouchMovesHeldOnScroll) {
// TODO(sky): fails with mus. https://crbug.com/866502
if (GetParam() == Env::Mode::MUS)
return;
EventFilterRecorder recorder; EventFilterRecorder recorder;
root_window()->AddPreTargetHandler(&recorder); root_window()->AddPreTargetHandler(&recorder);
test::TestWindowDelegate delegate; test::TestWindowDelegate delegate;
...@@ -2282,7 +2279,9 @@ class WindowEventDispatcherTestInHighDPI : public WindowEventDispatcherTest { ...@@ -2282,7 +2279,9 @@ class WindowEventDispatcherTestInHighDPI : public WindowEventDispatcherTest {
}; };
TEST_P(WindowEventDispatcherTestInHighDPI, EventLocationTransform) { TEST_P(WindowEventDispatcherTestInHighDPI, EventLocationTransform) {
// TODO(sky): fails with mus. https://crbug.com/866502 // This test is only applicable to LOCAL mode as it's setting a device scale
// factor and expecting events to be transformed while routing the event
// directly through host(). In MUS mode the window-service does the scaling.
if (GetParam() == Env::Mode::MUS) if (GetParam() == Env::Mode::MUS)
return; return;
...@@ -2322,9 +2321,12 @@ TEST_P(WindowEventDispatcherTestInHighDPI, EventLocationTransform) { ...@@ -2322,9 +2321,12 @@ TEST_P(WindowEventDispatcherTestInHighDPI, EventLocationTransform) {
} }
TEST_P(WindowEventDispatcherTestInHighDPI, TouchMovesHeldOnScroll) { TEST_P(WindowEventDispatcherTestInHighDPI, TouchMovesHeldOnScroll) {
// TODO(sky): fails with mus. https://crbug.com/866502 // This test is only applicable to LOCAL mode as it's setting a device scale
// factor and expecting events to be transformed while routing the event
// directly through host(). In MUS mode the window-service does the scaling.
if (GetParam() == Env::Mode::MUS) if (GetParam() == Env::Mode::MUS)
return; return;
EventFilterRecorder recorder; EventFilterRecorder recorder;
root_window()->AddPreTargetHandler(&recorder); root_window()->AddPreTargetHandler(&recorder);
test::TestWindowDelegate delegate; test::TestWindowDelegate delegate;
...@@ -2394,9 +2396,12 @@ class TriggerNestedLoopOnRightMousePress : public ui::test::TestEventHandler { ...@@ -2394,9 +2396,12 @@ class TriggerNestedLoopOnRightMousePress : public ui::test::TestEventHandler {
// correctly. // correctly.
TEST_P(WindowEventDispatcherTestInHighDPI, TEST_P(WindowEventDispatcherTestInHighDPI,
EventsTransformedInRepostedEventTriggeredNestedLoop) { EventsTransformedInRepostedEventTriggeredNestedLoop) {
// TODO(sky): fails with mus. https://crbug.com/866502 // This test is only applicable to LOCAL mode as it's setting a device scale
// factor and expecting events to be transformed while routing the event
// directly through host(). In MUS mode the window-service does the scaling.
if (GetParam() == Env::Mode::MUS) if (GetParam() == Env::Mode::MUS)
return; return;
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), NULL)); std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), NULL));
// Make sure the window is visible. // Make sure the window is visible.
RunAllPendingInMessageLoop(); RunAllPendingInMessageLoop();
...@@ -2851,7 +2856,9 @@ TEST_P(WindowEventDispatcherTest, TouchMovesMarkedWhenCausingScroll) { ...@@ -2851,7 +2856,9 @@ TEST_P(WindowEventDispatcherTest, TouchMovesMarkedWhenCausingScroll) {
// cursor's position in root coordinates has changed (e.g. when the displays's // cursor's position in root coordinates has changed (e.g. when the displays's
// scale factor changed). Test that hover effects are properly updated. // scale factor changed). Test that hover effects are properly updated.
TEST_P(WindowEventDispatcherTest, OnCursorMovedToRootLocationUpdatesHover) { TEST_P(WindowEventDispatcherTest, OnCursorMovedToRootLocationUpdatesHover) {
// TODO(sky): fails with mus. https://crbug.com/866502 // This test is only applicable to LOCAL mode as it's setting a device scale
// factor and expecting events to be transformed while routing the event
// directly through host(). In MUS mode the window-service does the scaling.
if (GetParam() == Env::Mode::MUS) if (GetParam() == Env::Mode::MUS)
return; return;
......
...@@ -1638,9 +1638,13 @@ TEST_P(WindowTest, Transform) { ...@@ -1638,9 +1638,13 @@ TEST_P(WindowTest, Transform) {
} }
TEST_P(WindowTest, TransformGesture) { TEST_P(WindowTest, TransformGesture) {
// TODO(sky): fails with mus. https://crbug.com/866502 // This test is only applicable to LOCAL mode as it's setting a transform on
// host() and expecting events to be transformed while routing the event
// directly through host(). In MUS mode the window-service does the
// transformation.
if (GetParam() == Env::Mode::MUS) if (GetParam() == Env::Mode::MUS)
return; return;
gfx::Size size = host()->GetBoundsInPixels().size(); gfx::Size size = host()->GetBoundsInPixels().size();
std::unique_ptr<GestureTrackPositionDelegate> delegate( std::unique_ptr<GestureTrackPositionDelegate> delegate(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment