New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690156 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 664570



Sign in to add a comment

Ozone X11 tests miss some initialization steps

Project Member Reported by kylec...@chromium.org, Feb 8 2017

Issue description

There are missing initialization steps for Ozone Chrome OS tests that run with --ozone-platform=x11. In particular, a test only initialization step to change override redirect X parameter is missing.

I noticed this when running views_mus_interactive_ui_tests locally with Xvfb. The test passes the first time it is run. The test fails if it is run again. If the binary gets replaced, the test will pass once. This doesn't occur running without Xvfb.

$ ninja -C out_test/release views_mus_interative_ui_tests
$ python testing/xvfb.py out_test/release/views_mus_interactive_ui_tests
# works
$ python testing/xvfb.py out_test/release/views_mus_interactive_ui_tests
# hangs and eventually times out
$ rm out_test/release/views_mus_interative_ui_tests
$ ninja -C out_test/release views_mus_interative_ui_tests
$ python testing/xvfb.py out_test/release/views_mus_interactive_ui_tests
# works again

The problem occurs when an XWindow is created and initialization blocks until a Map XEvent is received. The XEvent doesn't arrive and the test blocks until it times out.

This is related to ui::test::SetUseOverrideRedirectWindowByDefault() which changes one of the arguments to XCreateWindow(). In some test fixtures there is a block like:

#if defined(USE_X11)
 ui::test::SetUseOverrideRedirectWindowByDefault(true);
#endif

https://cs.chromium.org/chromium/src/ui/aura/test/aura_test_helper.cc?type=cs&l=55

This never gets called for Ozone X11 because USE_X11=0. Since the Ozone platform is decided at runtime it's not quite as simple. It will probably require adding a virtual function to OzonePlatform.
 
Status: Available (was: Untriaged)
Blocking: 664570
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 10 2017

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

commit e4030aee4483c7f90258ceb80c89bc3336ad92c3
Author: kylechar <kylechar@chromium.org>
Date: Fri Feb 10 22:36:08 2017

Move SetUseOverrideRedirectWindowByDefault() to //ui/base.

There is a test related function SetUseOverrideRedirectWindowByDefault()
that is called from a various tests to change the override redirect
attribute when creating an XWindow. We normally want this attribute to
be false, except in some tests where it needs to be true. Not setting
this true causes problems depending on the X window manager and test
failures with Xvfb.

The calls to SetUseOverrideRedirectWindowByDefault() were guarded by
ifdef for USE_X11. This doesn't work for Ozone X11 because USE_X11=0. We
can't check at compile time if we need to call the function because the
Ozone platform isn't decided until runtime.

Instead, SetUseOverrideRedirectWindowByDefault() is moved into
//ui/base. All the function does is set a bool that can be queried when
creating a XWindow. X11WindowBase and WindowTreeHostX11 check the value.
In all other instances the bool is never used and has no effect.

BUG= 690156 

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

[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ash/test/ash_test_helper.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/content/public/test/browser_test_base.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/services/ui/service.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/aura/test/aura_test_helper.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/aura/window_tree_host_x11.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/aura/window_tree_host_x11.h
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/base/BUILD.gn
[add] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/base/platform_window_defaults.cc
[add] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/base/platform_window_defaults.h
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/gl/BUILD.gn
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/gl/test/DEPS
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/gl/test/gl_surface_test_support.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/platform_window/x11/BUILD.gn
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/platform_window/x11/DEPS
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/platform_window/x11/x11_window_base.cc
[modify] https://crrev.com/e4030aee4483c7f90258ceb80c89bc3336ad92c3/ui/platform_window/x11/x11_window_base.h

Status: Fixed (was: Started)

Comment 5 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 6 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 7 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 8 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment