New issue
Advanced search Search tips

Issue 890050 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Remove 'set_async' from ui::test::EventGenerator

Project Member Reported by mukai@chromium.org, Sep 27

Issue description

It seems 'set_async' (and relevant asynchronous behavior) in ui::event::EventGenerator is only used by TabScrubberTest. Maybe we may want to remove this at all.

So far, simply removing this breaks existing TabScrubberTest. We need to look into why.
 
Cc: -sadrul@chromium.org
Status: Started (was: Assigned)
I'll do this as part of TabScrubber work.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ebc304557e0c849421af611db0a72f93740a3541

commit ebc304557e0c849421af611db0a72f93740a3541
Author: Scott Violet <sky@chromium.org>
Date: Wed Oct 24 23:36:52 2018

chromeos: gets TabScrubber tests working with mash

Many of these tests previously worked by using a pattern such as:
. make TabScrubbers timer use a zero delay.
. generate a bunch of async scroll events (using EventGenerator)
. record when active tab changes.
. run message loop, waiting for active tab to change to certain index,
  then stop.

This is problematic in the mash case as EventGenerator, for mash, runs
a message loop. This meant the timer would fire at unexpected times.

The fix is to increase the timer delay, generate a single event and then
force the TabScrubber timer to complete. This way the test gets consistent
results, regardless of whether EventGenerator internally runs a message
loop.

BUG= 889097 , 890050 
TEST=test only changes

Change-Id: I5decb690c4ef7ff67af21cc9a588aaa5046fad89
Reviewed-on: https://chromium-review.googlesource.com/c/1297288
Reviewed-by: Jun Mukai <mukai@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602522}
[modify] https://crrev.com/ebc304557e0c849421af611db0a72f93740a3541/ash/system/user/tray_user_unittest.cc
[modify] https://crrev.com/ebc304557e0c849421af611db0a72f93740a3541/chrome/browser/ui/ash/tab_scrubber.cc
[modify] https://crrev.com/ebc304557e0c849421af611db0a72f93740a3541/chrome/browser/ui/ash/tab_scrubber.h
[modify] https://crrev.com/ebc304557e0c849421af611db0a72f93740a3541/chrome/browser/ui/ash/tab_scrubber_browsertest.cc
[modify] https://crrev.com/ebc304557e0c849421af611db0a72f93740a3541/ui/events/test/event_generator.cc
[modify] https://crrev.com/ebc304557e0c849421af611db0a72f93740a3541/ui/events/test/event_generator.h

Status: Fixed (was: Started)

Sign in to add a comment