New issue
Advanced search Search tips

Issue 638670 link

Starred by 0 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

AshTestBase non-determinism when initializing display

Project Member Reported by jdufault@chromium.org, Aug 17 2016

Issue description

AshTestBase has some strange behavior. It sets up a display for tests to use[1], but doesn't actually initialize it. Adding 

  Shell::GetInstance()->display_manager()->UpdateDisplays();

after the

  ash_test_helper_->SetUp(start_session_, material_mode_);

call will initialize the display.

Making this change breaks 10 or so tests, but I think it exposes some real issues, such as in the autoclick tests. The autoclick tests break because initializing the display generates some mouse events. I suspect that this is the reason behind the autoclick flakes. I'm planning on uploading a CL to test this fix for autoclick tests only.

Other tests also fail for various reasons (I haven't fully investigated), ie, because the primary monitor is being set by AshTestBase instead of by the test itself.

I don't think fixing this will take all that long, but I don't have the time right now, so I'm filing a bug.

1: https://cs.chromium.org/chromium/src/ash/test/ash_test_base.cc?q=ash_test_base&dr=C&l=130
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 18 2016

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

commit 4fecc95b4947643d1c1ba8e30eafe516e10696cf
Author: jdufault <jdufault@chromium.org>
Date: Thu Aug 18 18:00:45 2016

Possible fix for autoclick test flakes.

The display was being initialized non-deterministicly before. When the display is initialized, it generates some input events which cause the test to fail. This CL makes sure the display is fully initialized before starting the test.

TEST=ash_unittests

BUG=638670

Review-Url: https://codereview.chromium.org/2251893003
Cr-Commit-Position: refs/heads/master@{#412888}

[modify] https://crrev.com/4fecc95b4947643d1c1ba8e30eafe516e10696cf/ash/autoclick/autoclick_unittest.cc

Comment 2 by osh...@chromium.org, Aug 18 2016

Display is initialized in Shell::Init. There may be a case that real events affects unit tests, because we don't distinguish them. can that be an issue?
Components: Tests

Sign in to add a comment