New issue
Advanced search Search tips

Make mash_unittests run tests in ash_unittests

Project Member Reported by sky@chromium.org, Feb 16 2017

Issue description

Now that mash uses aura it should be possible to run more of the ash_unittests. In particular it should be possible to use AshTestBase directly. This bug is specifically about running all existing ash_unittests (that make sense) in mash_unittests.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 16 2017

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

commit 92f5587fc88654201efb2e6658812c2aec5a7c2f
Author: sky <sky@chromium.org>
Date: Thu Feb 16 19:13:07 2017

Makes Shell::SetDisplayWorkAreaInsets() call to WmShell

This way code using Shell just works for mash.

BUG= 693114 
TEST=covered by tests
R=msw@chromium.org

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

[modify] https://crrev.com/92f5587fc88654201efb2e6658812c2aec5a7c2f/ash/aura/wm_shell_aura.cc
[modify] https://crrev.com/92f5587fc88654201efb2e6658812c2aec5a7c2f/ash/shell.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 17 2017

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

commit b39a71e6e5f10e51c57c0aa671f7fbfcc3abacd2
Author: sky <sky@chromium.org>
Date: Fri Feb 17 00:19:23 2017

chromeos: Makes InputMethodMus dispatch immediately if no server

This may come up in tests that dispatch events.

BUG= 693114 
TEST=covered by tests
R=moshayedi@chromium.org, sadrul@chromium.org
TBR=sadrul@chromium.org

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

[modify] https://crrev.com/b39a71e6e5f10e51c57c0aa671f7fbfcc3abacd2/ui/aura/mus/input_method_mus.cc

Project Member

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

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

commit d06586de254e7ecfd8d3620a45253faaf520334e
Author: sky <sky@chromium.org>
Date: Wed Feb 22 17:46:36 2017

chromeos: Makes AshTestBase/Helper target mash when appropriate

And gets a single test working in both mash and ash. This means we
can get rid of AshTest, but that's for later.

BUG= 693114 
TEST=covered by tests
R=msw@chromium.org

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

[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/BUILD.gn
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/accelerators/accelerator_controller_unittest.cc
[delete] https://crrev.com/e96528b1b2250ef51580a706dd7950293944cfd3/ash/common/BUILD.gn
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/common/system/tray/tray_details_view_unittest.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/display/window_tree_host_manager_unittest.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/BUILD.gn
[delete] https://crrev.com/e96528b1b2250ef51580a706dd7950293944cfd3/ash/mus/accelerators/accelerator_controller_registrar_test_api.cc
[delete] https://crrev.com/e96528b1b2250ef51580a706dd7950293944cfd3/ash/mus/accelerators/accelerator_controller_registrar_test_api.h
[delete] https://crrev.com/e96528b1b2250ef51580a706dd7950293944cfd3/ash/mus/accelerators/accelerator_controller_unittest.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/bridge/wm_shell_mus.h
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/test/wm_test_helper.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/test/wm_test_helper.h
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/window_manager.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/window_manager.h
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/window_manager_application.h
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/mus/window_manager_unittest.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/test/BUILD.gn
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/test/ash_test_base.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/test/ash_test_base.h
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/test/ash_test_helper.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ash/test/ash_test_helper.h
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/components/exo/BUILD.gn
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/mash/BUILD.gn
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/mash/test/mash_test_suite.cc
[modify] https://crrev.com/d06586de254e7ecfd8d3620a45253faaf520334e/ui/display/test/display_manager_test_api.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 23 2017

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

commit 73b3f2563cca092c6ddbe6a9f3a87fdbd30e798e
Author: sky <sky@chromium.org>
Date: Thu Feb 23 04:40:33 2017

chromeos: Adds AshDevToolsTest to common_unittests

This makes it run in both ash_unittests and mash_unittests. I had to
update one of the tests. In particular it was setting a new size of
the widget, but the size had non effect on ash (because of different
minimum size) where as it does on mash. I increased the size so that
the new size triggers a resize on both, and I changed some names for
improved readability.

BUG= 693114 
TEST=covered by tests

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

[modify] https://crrev.com/73b3f2563cca092c6ddbe6a9f3a87fdbd30e798e/ash/BUILD.gn
[modify] https://crrev.com/73b3f2563cca092c6ddbe6a9f3a87fdbd30e798e/ash/common/devtools/ash_devtools_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 27 2017

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

commit 56ce72b787bcd211e206ec4d49bb06f07590ca3f
Author: sky <sky@chromium.org>
Date: Mon Feb 27 19:07:06 2017

chromeos: makes more tests run in both mash and ash

BUG= 693114 , 581462 ,647438, 695628 , 695629 , 695632 ,695640, 695686 , 695751 ,695758, 695887 , 696006 , 696028 
TEST=test only changes
R=msw@chromium.org

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

[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/BUILD.gn
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/metrics/user_metrics_recorder_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/screen_util_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shelf/shelf_layout_manager_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shelf/shelf_view_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shell_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/sticky_keys/sticky_keys_overlay_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 27 2017

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

commit 56ce72b787bcd211e206ec4d49bb06f07590ca3f
Author: sky <sky@chromium.org>
Date: Mon Feb 27 19:07:06 2017

chromeos: makes more tests run in both mash and ash

BUG= 693114 , 581462 ,647438, 695628 , 695629 , 695632 ,695640, 695686 , 695751 ,695758, 695887 , 696006 , 696028 
TEST=test only changes
R=msw@chromium.org

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

[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/BUILD.gn
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/metrics/user_metrics_recorder_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/screen_util_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shelf/shelf_layout_manager_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shelf/shelf_view_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shell_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/sticky_keys/sticky_keys_overlay_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 27 2017

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

commit 56ce72b787bcd211e206ec4d49bb06f07590ca3f
Author: sky <sky@chromium.org>
Date: Mon Feb 27 19:07:06 2017

chromeos: makes more tests run in both mash and ash

BUG= 693114 , 581462 ,647438, 695628 , 695629 , 695632 ,695640, 695686 , 695751 ,695758, 695887 , 696006 , 696028 
TEST=test only changes
R=msw@chromium.org

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

[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/BUILD.gn
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/metrics/user_metrics_recorder_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/screen_util_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shelf/shelf_layout_manager_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shelf/shelf_view_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/shell_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/sticky_keys/sticky_keys_overlay_unittest.cc
[modify] https://crrev.com/56ce72b787bcd211e206ec4d49bb06f07590ca3f/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 6 2017

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 7 2017

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

commit fded3f5a07ab164d57fbb3ecd0e480009ff0cdca
Author: sky <sky@chromium.org>
Date: Tue Mar 07 01:08:58 2017

Makes ChildModalWindow not leak

WindowModalityController uses ChildModalWindow class. ChildModalWindow
was leaking a Widget, causing problems in mash (WindowTreeClient
CHECKs there are no windows left when destroyed).

BUG= 693114 
TEST=none
R=erg@chromium.org

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

[modify] https://crrev.com/fded3f5a07ab164d57fbb3ecd0e480009ff0cdca/ash/test/child_modal_window.cc
[modify] https://crrev.com/fded3f5a07ab164d57fbb3ecd0e480009ff0cdca/ash/test/child_modal_window.h

Comment 11 by sky@chromium.org, Mar 7 2017

Blockedon: 632209

Comment 12 by sky@chromium.org, Mar 7 2017

Blockedon: 632201

Comment 13 by sky@chromium.org, Mar 7 2017

Blockedon: 632189
Project Member

Comment 14 by bugdroid1@chromium.org, Mar 7 2017

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

commit d43cd7f2d1b33ba4954de9a6d7c362962a0347ec
Author: sky <sky@chromium.org>
Date: Tue Mar 07 19:59:48 2017

Fixs bug resulting in double event delivery in mus

EventGenerator::DoDispatchEvent() sends to IME and if not handled
processes the event. For mus this results in double the events as IME
routes to the right source, and then because the event wasn't handled
EventGenerator::DoDispatchEvent() processes as well. This was
resulting in some tests incorrectly failing that use EventGenerator.

BUG= 693114 
TEST=none
R=moshayedi@chromium.org, sadrul@chromium.org

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

[modify] https://crrev.com/d43cd7f2d1b33ba4954de9a6d7c362962a0347ec/ui/aura/BUILD.gn
[modify] https://crrev.com/d43cd7f2d1b33ba4954de9a6d7c362962a0347ec/ui/aura/mus/input_method_mus.cc
[modify] https://crrev.com/d43cd7f2d1b33ba4954de9a6d7c362962a0347ec/ui/aura/mus/input_method_mus_unittest.cc
[add] https://crrev.com/d43cd7f2d1b33ba4954de9a6d7c362962a0347ec/ui/aura/test/mus/input_method_mus_test_api.h
[modify] https://crrev.com/d43cd7f2d1b33ba4954de9a6d7c362962a0347ec/ui/views/mus/views_mus_test_suite.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 7 2017

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

commit ea37af717f1569dd93282e09b6fb49ff22b771f8
Author: sky <sky@chromium.org>
Date: Tue Mar 07 22:59:41 2017

Last sets of tests that can move to common_unittests

This way they run in both mash_unittests and ash_unittests.
Interesting things of note:
. Had to remove DCHECKs for GetRootWindowForDisplayId() as some tests
  call with invalid.
. Had to rename class in mus named WindowManagerTest as it conflicts
  with test with same name in ash.

BUG= 622486 , 631103 , 637853 , 648733 ,695556, 696028 ,698091, 698129 , 698878 , 698887 ,698888,698892,698894, 698895 , 698914 ,699172,699175, 693114 
TEST=test changes
R=msw@chromium.org

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

[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/BUILD.gn
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/mus/window_manager_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/test/ash_test_base.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/overview/window_selector_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/panels/panel_layout_manager_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/panels/panel_window_resizer_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/system_modal_container_layout_manager_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/window_cycle_controller_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/window_manager_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/window_modality_controller_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/window_state_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/window_util_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/workspace/workspace_event_handler_unittest.cc
[modify] https://crrev.com/ea37af717f1569dd93282e09b6fb49ff22b771f8/ash/wm/workspace/workspace_window_resizer_unittest.cc

Comment 16 by sky@chromium.org, Apr 4 2017

Labels: mustash-2
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 24 2017

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

commit c8aaa59a9d633c83786430912550da71a57f3047
Author: James Cook <jamescook@chromium.org>
Date: Tue Oct 24 16:49:06 2017

cros: Update ash_unittests --mash filter file

This re-enables ~200 ash_unittests that now pass under --mash.

Add early exits to the 2 tests that are not expected to run under mash,
rather than using the filter file, so that eventually the filter file
can become empty.

Bug:  693114 
Test: ash_unittests --mash
Change-Id: Iadafc1b99fb9f19d62736823fccfd0396eaec018
Reviewed-on: https://chromium-review.googlesource.com/731115
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511177}
[modify] https://crrev.com/c8aaa59a9d633c83786430912550da71a57f3047/ash/pointer_watcher_adapter_classic_unittest.cc
[modify] https://crrev.com/c8aaa59a9d633c83786430912550da71a57f3047/testing/buildbot/filters/ash_unittests_mash.filter

Blockedon: 780637
Project Member

Comment 19 by bugdroid1@chromium.org, Nov 9 2017

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

commit 57d408b8b6f77facb9cd0087c3469d2e41d0d9bf
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Thu Nov 09 02:35:03 2017

Mash: Audit and document ash_unittests_mash.filter

Bug:  693114 
Change-Id: I8b3c0ef0342009794a97c0c9afdcdb417710aee4
Reviewed-on: https://chromium-review.googlesource.com/752075
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515064}
[modify] https://crrev.com/57d408b8b6f77facb9cd0087c3469d2e41d0d9bf/testing/buildbot/filters/ash_unittests_mash.filter

Scott, is this still relevant? It seems like we should get rid of mash_unittests, and I see an existing  issue 729810  for that.


Comment 21 by sky@chromium.org, Dec 8 2017

Status: WontFix (was: Started)
Agreed. This isn't relevant anymore. I don't think 729810 is either. Let me look at 729810 separately.

Sign in to add a comment