Commit ed6da57d authored by sky's avatar sky Committed by Commit bot

Adds ash_mus_unittests to FYI bot

There are a slew of failures that need to be investigated. Rather than
early out all the tests I'm adding a filter file. This makes it easier
to retry tests as functionality is addded.

I've also cleaned up a handful of things in looking at failures.

BUG=705715
TEST=this is test change
R=msw@chromium.org

Review-Url: https://codereview.chromium.org/2803933003
Cr-Commit-Position: refs/heads/master@{#462628}
parent 0f822b53
......@@ -15,10 +15,18 @@
#include "ui/app_list/views/app_list_view.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/display/manager/display_manager.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/events/test/event_generator.h"
namespace ash {
namespace {
int64_t GetPrimaryDisplayId() {
return display::Screen::GetScreen()->GetPrimaryDisplay().id();
}
} // namespace
class AppListPresenterDelegateTest : public test::AshTestBase {
public:
......@@ -45,7 +53,7 @@ class AppListPresenterDelegateTest : public test::AshTestBase {
// Tests that app launcher hides when focus moves to a normal window.
TEST_F(AppListPresenterDelegateTest, HideOnFocusOut) {
app_list_presenter_impl()->Show(display_manager()->first_display_id());
app_list_presenter_impl()->Show(GetPrimaryDisplayId());
EXPECT_TRUE(app_list_presenter_impl()->GetTargetVisibility());
std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
......@@ -58,7 +66,7 @@ TEST_F(AppListPresenterDelegateTest, HideOnFocusOut) {
// window in kShellWindowId_AppListContainer.
TEST_F(AppListPresenterDelegateTest,
RemainVisibleWhenFocusingToApplistContainer) {
app_list_presenter_impl()->Show(display_manager()->first_display_id());
app_list_presenter_impl()->Show(GetPrimaryDisplayId());
EXPECT_TRUE(app_list_presenter_impl()->GetTargetVisibility());
aura::Window* applist_container = Shell::GetContainer(
......@@ -72,7 +80,7 @@ TEST_F(AppListPresenterDelegateTest,
// Tests that clicking outside the app-list bubble closes it.
TEST_F(AppListPresenterDelegateTest, ClickOutsideBubbleClosesBubble) {
app_list_presenter_impl()->Show(display_manager()->first_display_id());
app_list_presenter_impl()->Show(GetPrimaryDisplayId());
aura::Window* app_window = app_list_presenter_impl()->GetWindow();
ASSERT_TRUE(app_window);
ui::test::EventGenerator& generator = GetEventGenerator();
......@@ -93,7 +101,7 @@ TEST_F(AppListPresenterDelegateTest, ClickOutsideBubbleClosesBubble) {
// Tests that clicking outside the app-list bubble closes it.
TEST_F(AppListPresenterDelegateTest, TapOutsideBubbleClosesBubble) {
app_list_presenter_impl()->Show(display_manager()->first_display_id());
app_list_presenter_impl()->Show(GetPrimaryDisplayId());
aura::Window* app_window = app_list_presenter_impl()->GetWindow();
ASSERT_TRUE(app_window);
......@@ -140,7 +148,7 @@ TEST_F(AppListPresenterDelegateTest, TinyDisplay) {
// Set up a screen with a tiny display (height smaller than the app list).
UpdateDisplay("400x300");
app_list_presenter_impl()->Show(display_manager()->first_display_id());
app_list_presenter_impl()->Show(GetPrimaryDisplayId());
EXPECT_TRUE(app_list_presenter_impl()->GetTargetVisibility());
// The top of the app list should be on-screen (even if the bottom is not).
......
......@@ -57,9 +57,8 @@ class WindowOwner {
// real implementation. This class exists so that tests can be written to
// ash/common and run in both mus and aura.
//
// The implementation of AshTestImpl that is used depends upon gn targets. To
// use the aura backend depend on "//ash/test:ash_with_aura_test_support." The
// mus backend is not provided as a separate link target.
// TODO: this class is deprecated and should be removed.
// http://crbug.com/707057.
class AshTest : public testing::Test {
public:
AshTest();
......
......@@ -12,14 +12,7 @@
namespace ash {
class DisplayConfigurationControllerTest : public test::AshTestBase {
public:
DisplayConfigurationControllerTest() {}
~DisplayConfigurationControllerTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(DisplayConfigurationControllerTest);
};
using DisplayConfigurationControllerTest = test::AshTestBase;
TEST_F(DisplayConfigurationControllerTest, ErasesAnimatorOnAnimationEnded) {
// TODO(wutao): needs display_configuration_controller
......
......@@ -54,24 +54,7 @@ class MirrorOnBootTest : public test::AshTestBase {
typedef test::AshTestBase MirrorWindowControllerTest;
#if defined(OS_WIN)
// Software mirroring does not work on win.
#define MAYBE_MirrorCursorBasic DISABLED_MirrorCursorBasic
#define MAYBE_MirrorCursorLocations DISABLED_MirrorCursorLocations
#define MAYBE_MirrorCursorMoveOnEnter DISABLED_MirrorCursorMoveOnEnter
#define MAYBE_MirrorCursorRotate DISABLED_MirrorCursorRotate
#define MAYBE_DockMode DISABLED_DockMode
#define MAYBE_MirrorOnBoot DISABLED_MirrorOnBoot
#else
#define MAYBE_MirrorCursorBasic MirrorCursorBasic
#define MAYBE_MirrorCursorLocations MirrorCursorLocations
#define MAYBE_MirrorCursorMoveOnEnter MirrorCursorMoveOnEnter
#define MAYBE_MirrorCursorRotate MirrorCursorRotate
#define MAYBE_DockMode DockMode
#define MAYBE_MirrorOnBoot MirrorOnBoot
#endif
TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorBasic) {
TEST_F(MirrorWindowControllerTest, MirrorCursorBasic) {
test::MirrorWindowTestApi test_api;
aura::test::TestWindowDelegate test_window_delegate;
test_window_delegate.set_window_component(HTTOP);
......@@ -117,7 +100,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorBasic) {
EXPECT_TRUE(test_api.GetCursorWindow()->IsVisible());
}
TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorRotate) {
TEST_F(MirrorWindowControllerTest, MirrorCursorRotate) {
test::MirrorWindowTestApi test_api;
aura::test::TestWindowDelegate test_window_delegate;
test_window_delegate.set_window_component(HTTOP);
......@@ -171,7 +154,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorRotate) {
// Make sure that the mirror cursor's location is same as
// the source display's host location in the mirror root window's
// coordinates.
TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorLocations) {
TEST_F(MirrorWindowControllerTest, MirrorCursorLocations) {
test::MirrorWindowTestApi test_api;
display_manager()->SetMultiDisplayMode(display::DisplayManager::MIRRORING);
......@@ -205,7 +188,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorLocations) {
// Test the behavior of the cursor when entering software mirror mode swaps the
// cursor's display.
TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorMoveOnEnter) {
TEST_F(MirrorWindowControllerTest, MirrorCursorMoveOnEnter) {
aura::Env* env = aura::Env::GetInstance();
Shell* shell = Shell::Get();
WindowTreeHostManager* window_tree_host_manager =
......@@ -253,7 +236,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorMoveOnEnter) {
// Make sure that the compositor based mirroring can switch
// from/to dock mode.
TEST_F(MirrorWindowControllerTest, MAYBE_DockMode) {
TEST_F(MirrorWindowControllerTest, DockMode) {
const int64_t internal_id = 1;
const int64_t external_id = 2;
......@@ -297,7 +280,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_DockMode) {
EXPECT_EQ(external_id, display_manager()->mirroring_display_id());
}
TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) {
TEST_F(MirrorOnBootTest, MirrorOnBoot) {
EXPECT_TRUE(display_manager()->IsInMirrorMode());
RunAllPendingInMessageLoop();
test::MirrorWindowTestApi test_api;
......
......@@ -113,12 +113,12 @@ class TestEventHandler : public ui::EventHandler {
class RootWindowTransformersTest : public test::AshTestBase {
public:
RootWindowTransformersTest(){};
~RootWindowTransformersTest() override{};
RootWindowTransformersTest() {}
~RootWindowTransformersTest() override {}
float GetStoredUIScale(int64_t id) {
return display_manager()->GetDisplayInfo(id).GetEffectiveUIScale();
};
}
std::unique_ptr<RootWindowTransformer>
CreateCurrentRootWindowTransformerForMirroring() {
......@@ -132,7 +132,7 @@ class RootWindowTransformersTest : public test::AshTestBase {
return std::unique_ptr<RootWindowTransformer>(
CreateRootWindowTransformerForMirroredDisplay(source_display_info,
mirror_display_info));
};
}
DISALLOW_COPY_AND_ASSIGN(RootWindowTransformersTest);
};
......@@ -141,19 +141,7 @@ class RootWindowTransformersTest : public test::AshTestBase {
// using RootWindowTransformersTest = test::AshTestBase;
#if defined(OS_WIN)
// TODO(scottmg): RootWindow doesn't get resized on Windows
// Ash. http://crbug.com/247916.
#define MAYBE_RotateAndMagnify DISABLED_RotateAndMagniy
#define MAYBE_TouchScaleAndMagnify DISABLED_TouchScaleAndMagnify
#define MAYBE_ConvertHostToRootCoords DISABLED_ConvertHostToRootCoords
#else
#define MAYBE_RotateAndMagnify RotateAndMagniy
#define MAYBE_TouchScaleAndMagnify TouchScaleAndMagnify
#define MAYBE_ConvertHostToRootCoords ConvertHostToRootCoords
#endif
TEST_F(RootWindowTransformersTest, MAYBE_RotateAndMagnify) {
TEST_F(RootWindowTransformersTest, RotateAndMagnify) {
MagnificationController* magnifier = Shell::Get()->magnification_controller();
TestEventHandler event_handler;
......@@ -295,7 +283,7 @@ TEST_F(RootWindowTransformersTest, ScaleAndMagnify) {
Shell::Get()->RemovePreTargetHandler(&event_handler);
}
TEST_F(RootWindowTransformersTest, MAYBE_TouchScaleAndMagnify) {
TEST_F(RootWindowTransformersTest, TouchScaleAndMagnify) {
TestEventHandler event_handler;
Shell::Get()->AddPreTargetHandler(&event_handler);
......@@ -330,7 +318,7 @@ TEST_F(RootWindowTransformersTest, MAYBE_TouchScaleAndMagnify) {
Shell::Get()->RemovePreTargetHandler(&event_handler);
}
TEST_F(RootWindowTransformersTest, MAYBE_ConvertHostToRootCoords) {
TEST_F(RootWindowTransformersTest, ConvertHostToRootCoords) {
TestEventHandler event_handler;
Shell::Get()->AddPreTargetHandler(&event_handler);
MagnificationController* magnifier = Shell::Get()->magnification_controller();
......
......@@ -6,18 +6,10 @@
#include "ash/test/ash_test_base.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/display/manager/display_manager.h"
namespace ash {
class ScreenAshTest : public test::AshTestBase {
public:
ScreenAshTest() {}
~ScreenAshTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(ScreenAshTest);
};
using ScreenAshTest = test::AshTestBase;
// Tests that ScreenAsh::GetWindowAtScreenPoint() returns the correct window on
// the correct display.
......
......@@ -21,27 +21,6 @@
#include "ui/display/screen.h"
#include "ui/events/test/event_generator.h"
#if defined(OS_WIN)
// TODO(scottmg): RootWindow doesn't get resized immediately on Windows
// Ash. http://crbug.com/247916.
#define MAYBE_ConvertHostPointToScreen DISABLED_ConvertHostPointToScreen
#define MAYBE_ConvertHostPointToScreenHiDPI \
DISABLED_ConvertHostPointToScreenHiDPI
#define MAYBE_ConvertHostPointToScreenRotate \
DISABLED_ConvertHostPointToScreenRotate
#define MAYBE_ConvertHostPointToScreenUIScale \
DISABLED_ConvertHostPointToScreenUIScale
#define MAYBE_ConvertToScreenWhileRemovingSecondaryDisplay \
DISABLED_ConvertToScreenWhileRemovingSecondaryDisplay
#else
#define MAYBE_ConvertHostPointToScreen ConvertHostPointToScreen
#define MAYBE_ConvertHostPointToScreenHiDPI ConvertHostPointToScreenHiDPI
#define MAYBE_ConvertHostPointToScreenRotate ConvertHostPointToScreenRotate
#define MAYBE_ConvertHostPointToScreenUIScale ConvertHostPointToScreenUIScale
#define MAYBE_ConvertToScreenWhileRemovingSecondaryDisplay \
ConvertToScreenWhileRemovingSecondaryDisplay
#endif
namespace ash {
namespace test {
......@@ -97,7 +76,7 @@ class ScreenPositionControllerTest : public test::AshTestBase {
} // namespace
TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
TEST_F(ScreenPositionControllerTest, ConvertHostPointToScreen) {
// Make sure that the point is in host coordinates. (crbug.com/521919)
UpdateDisplay("100+100-200x200,100+300-200x200");
// The point 150,210 should be in host coords, and detected as outside.
......@@ -190,7 +169,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
}
TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenHiDPI) {
TEST_F(ScreenPositionControllerTest, ConvertHostPointToScreenHiDPI) {
UpdateDisplay("50+50-200x200*2,50+300-300x300");
aura::Window::Windows root_windows = Shell::Get()->GetAllRootWindows();
......@@ -221,7 +200,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenHiDPI) {
EXPECT_EQ("80,80", ConvertHostPointToScreen(160, 160));
}
TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenRotate) {
TEST_F(ScreenPositionControllerTest, ConvertHostPointToScreenRotate) {
// 1st display is rotated 90 clockise, and 2nd display is rotated
// 270 clockwise.
UpdateDisplay("100+100-200x200/r,100+500-200x200/l");
......@@ -253,7 +232,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenRotate) {
EXPECT_EQ("50,149", ConvertHostPointToScreen(50, -350));
}
TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenUIScale) {
TEST_F(ScreenPositionControllerTest, ConvertHostPointToScreenUIScale) {
// 1st display is 2x density with 1.5 UI scale.
UpdateDisplay("100+100-200x200*2@1.5,100+500-200x200");
// Put |window_| to the 1st.
......@@ -321,7 +300,7 @@ class ConvertToScreenEventHandler : public ui::EventHandler {
// detached from the root window prior to the root window being destroyed. Test
// that no events are dispatched at this time.
TEST_F(ScreenPositionControllerTest,
MAYBE_ConvertToScreenWhileRemovingSecondaryDisplay) {
ConvertToScreenWhileRemovingSecondaryDisplay) {
UpdateDisplay("600x600,600x600");
RunAllPendingInMessageLoop();
......
......@@ -215,17 +215,17 @@ void WmShellMus::SetDisplayWorkAreaInsets(WmWindow* window,
}
void WmShellMus::LockCursor() {
// TODO: http::/crbug.com/637853
// TODO: http://crbug.com/637853
NOTIMPLEMENTED();
}
void WmShellMus::UnlockCursor() {
// TODO: http::/crbug.com/637853
// TODO: http://crbug.com/637853
NOTIMPLEMENTED();
}
bool WmShellMus::IsMouseEventsEnabled() {
// TODO: http::/crbug.com/637853
// TODO: http://crbug.com/637853
NOTIMPLEMENTED();
return true;
}
......
......@@ -11,6 +11,7 @@
#include "ash/common/test/test_session_controller_client.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/config.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/lock_state_controller_test_api.h"
......@@ -76,10 +77,10 @@ class TabletPowerButtonControllerTest : public AshTestBase {
void TearDown() override {
generator_ = nullptr;
const bool is_mash = WmShell::Get()->IsRunningInMash();
const Config config = Shell::GetAshConfig();
AshTestBase::TearDown();
// Mash shuts down dbus after each test.
if (!is_mash)
// Mash/mus shuts down dbus after each test.
if (config == Config::CLASSIC)
chromeos::DBusThreadManager::Shutdown();
}
......
......@@ -940,7 +940,8 @@ TEST_F(WindowSelectorTest, SelectingHidesAppList) {
// The tested behavior relies on the app list presenter delegate.
test::TestAppListViewPresenterImpl app_list_presenter_impl;
app_list_presenter_impl.Show(display_manager()->first_display_id());
app_list_presenter_impl.Show(
display::Screen::GetScreen()->GetPrimaryDisplay().id());
EXPECT_TRUE(app_list_presenter_impl.IsVisible());
ToggleOverview();
......
......@@ -492,7 +492,8 @@ TEST_F(WindowCycleControllerTest, SelectingHidesAppList) {
std::unique_ptr<aura::Window> window0(CreateTestWindowInShellWithId(0));
std::unique_ptr<aura::Window> window1(CreateTestWindowInShellWithId(1));
app_list_presenter_impl.Show(display_manager()->first_display_id());
app_list_presenter_impl.Show(
display::Screen::GetScreen()->GetPrimaryDisplay().id());
EXPECT_TRUE(app_list_presenter_impl.IsVisible());
controller->HandleCycleWindow(WindowCycleController::FORWARD);
EXPECT_FALSE(app_list_presenter_impl.IsVisible());
......
......@@ -11788,6 +11788,16 @@
"mash:all"
],
"gtest_tests": [
{
"args": [
"--mus",
"--test-launcher-filter-file=../../testing/buildbot/filters/ash_mus_unittests.filter"
],
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "ash_mus_unittests"
},
{
"args": [
"--override-use-software-gl-for-tests",
......
This diff is collapsed.
......@@ -148,6 +148,13 @@
"label": "//ash:ash_unittests",
"type": "windowed_test_launcher",
},
"ash_mus_unittests": {
"label": "//ash:ash_unittests",
"type": "windowed_test_launcher",
"args": [
"--mus",
],
},
"audio_unittests": {
"label": "//media:audio_unittests",
"type": "raw",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment