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,
WindowEventDispatcher(WindowTreeHost* host, bool are_events_in_pixels);
~WindowEventDispatcher() override;
bool are_events_in_pixels() const { return are_events_in_pixels_; }
// Stops dispatching/synthesizing mouse events.
void Shutdown();
......
......@@ -1010,9 +1010,6 @@ class HoldPointerOnScrollHandler : public ui::test::TestEventHandler {
// Tests that touch-move events don't contribute to an in-progress scroll
// gesture if touch-move events are being held by the dispatcher.
TEST_P(WindowEventDispatcherTest, TouchMovesHeldOnScroll) {
// TODO(sky): fails with mus. https://crbug.com/866502
if (GetParam() == Env::Mode::MUS)
return;
EventFilterRecorder recorder;
root_window()->AddPreTargetHandler(&recorder);
test::TestWindowDelegate delegate;
......@@ -2282,7 +2279,9 @@ class WindowEventDispatcherTestInHighDPI : public WindowEventDispatcherTest {
};
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)
return;
......@@ -2322,9 +2321,12 @@ TEST_P(WindowEventDispatcherTestInHighDPI, EventLocationTransform) {
}
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)
return;
EventFilterRecorder recorder;
root_window()->AddPreTargetHandler(&recorder);
test::TestWindowDelegate delegate;
......@@ -2394,9 +2396,12 @@ class TriggerNestedLoopOnRightMousePress : public ui::test::TestEventHandler {
// correctly.
TEST_P(WindowEventDispatcherTestInHighDPI,
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)
return;
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), NULL));
// Make sure the window is visible.
RunAllPendingInMessageLoop();
......@@ -2851,7 +2856,9 @@ TEST_P(WindowEventDispatcherTest, TouchMovesMarkedWhenCausingScroll) {
// cursor's position in root coordinates has changed (e.g. when the displays's
// scale factor changed). Test that hover effects are properly updated.
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)
return;
......
......@@ -1638,9 +1638,13 @@ TEST_P(WindowTest, Transform) {
}
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)
return;
gfx::Size size = host()->GetBoundsInPixels().size();
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