Descriptionchromeos: Fix screen locker tests.
These appear to have been following the pattern of:
ScreenLocker::Show();
...
ui_test_utils::WaitForNotification(
NotificationType::SCREEN_LOCK_STATE_CHANGED);
I believe that this hangs until the test times out if the
notification is sent before we return from Show() (since we
won't yet be listening for the notification at the time).
I'm changing them to:
ScreenLocker::Show();
...
if (!chromeos::ScreenLocker::GetTester()->IsLocked())
ui_test_utils::WaitForNotification(
NotificationType::SCREEN_LOCK_STATE_CHANGED);
The old version looks like it started failing with my
r66287, which I don't understand -- I thought that we were
already generating the notification immediately as of
r66131, which fixed a bug where the initial attempt to grab
the pointer and keyboard always failed (thus ensuring that
the notifications wouldn't be sent until the next time that
the event loop was run).
BUG=none
TEST=all screen locker tests passed on my local machine
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66340
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66464
Patch Set 1 #Patch Set 2 : uncomment formerly-failing expectation #Messages
Total messages: 4 (0 generated)
|