diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-21 18:46:05 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-21 18:46:05 +0000 |
commit | 1c3f7002d91087f655dc805ac115e69ce1dc02fb (patch) | |
tree | 5ab0a121c2901bbcd16731c8236b6db527024833 /ash/display | |
parent | 345f3919f5b66370ddc2152468286b381ffb5bbb (diff) | |
download | chromium_src-1c3f7002d91087f655dc805ac115e69ce1dc02fb.zip chromium_src-1c3f7002d91087f655dc805ac115e69ce1dc02fb.tar.gz chromium_src-1c3f7002d91087f655dc805ac115e69ce1dc02fb.tar.bz2 |
Initial whack at getting ash_unittests to connect to a viewer process on Win/Metro.
This adds a test viewer process host to the ash unittests that starts and connects to the viewer process, using the provided hwnd as a backing surface for the tests.
This approach allows most of the ash unittests to pass except for two categories:
1) Tests that spin up more than one ash display. These don't work since each RootWindowHost thus created would require a remote connection and there is only one Metro viewer process.
2) Some number of tests seem to tickle a crash in shader.cc. These are short-circuited on Win8 with a TODO.
Some limitations:
1) The tests require chrome.exe to be registered as the default browser on Windows 8 to be used as a viewer process. This could be fixed in a future CL by creating a minimal viewer process for tests.
2) To register chrome.exe as the default browser, setup.exe needs to be built and run with
setup.exe --register-dev-chrome --register-dev-chrome-suffix=.test
This will be fixed in a future CL by extracting the registration code.
The interesting parts are in ash/test/test_metro_viewer_process_host.h
ash/test/test_metro_viewer_process_host.cc
Most of the rest is test disabling or calling the above.
BUG=154081
TEST=ash_unittests.exe on win8.
Review URL: https://chromiumcodereview.appspot.com/11830038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177946 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display')
-rw-r--r-- | ash/display/display_controller_unittest.cc | 11 | ||||
-rw-r--r-- | ash/display/mouse_cursor_event_filter_unittest.cc | 29 |
2 files changed, 6 insertions, 34 deletions
diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc index a9244e6..a507062 100644 --- a/ash/display/display_controller_unittest.cc +++ b/ash/display/display_controller_unittest.cc @@ -439,16 +439,7 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { EXPECT_TRUE(primary_root->Contains(launcher_window)); } -#if defined(OS_WIN) -// Multiple displays are not supported on Windows Ash. http://crbug.com/165962 -#define MAYBE_CursorDeviceScaleFactorSwapPrimary \ - DISABLED_CursorDeviceScaleFactorSwapPrimary -#else -#define MAYBE_CursorDeviceScaleFactorSwapPrimary \ - CursorDeviceScaleFactorSwapPrimary -#endif - -TEST_F(DisplayControllerTest, MAYBE_CursorDeviceScaleFactorSwapPrimary) { +TEST_F(DisplayControllerTest, CursorDeviceScaleFactorSwapPrimary) { DisplayController* display_controller = Shell::GetInstance()->display_controller(); diff --git a/ash/display/mouse_cursor_event_filter_unittest.cc b/ash/display/mouse_cursor_event_filter_unittest.cc index 05447f5..00a53f5 100644 --- a/ash/display/mouse_cursor_event_filter_unittest.cc +++ b/ash/display/mouse_cursor_event_filter_unittest.cc @@ -32,26 +32,9 @@ gfx::Display GetSecondaryDisplay() { typedef test::AshTestBase MouseCursorEventFilterTest; -#if defined(OS_WIN) -// Multiple displays are not supported on Windows Ash. http://crbug.com/165962 -#define MAYBE_WarpMouse DISABLED_WarpMouse -#define MAYBE_CursorDeviceScaleFactor DISABLED_CursorDeviceScaleFactor -#define MAYBE_WarpMouseDifferentSizeDisplays \ - DISABLED_WarpMouseDifferentSizeDisplays -#define MAYBE_WarpMouseDifferentScaleDisplays \ - DISABLED_WarpMouseDifferentScaleDisplays -#define MAYBE_SetMouseWarpModeFlag DISABLED_SetMouseWarpModeFlag -#else -#define MAYBE_WarpMouse WarpMouse -#define MAYBE_CursorDeviceScaleFactor CursorDeviceScaleFactor -#define MAYBE_WarpMouseDifferentSizeDisplays WarpMouseDifferentSizeDisplays -#define MAYBE_WarpMouseDifferentScaleDisplays WarpMouseDifferentScaleDisplays -#define MAYBE_SetMouseWarpModeFlag SetMouseWarpModeFlag -#endif - // Verifies if the mouse pointer correctly moves to another display when there // are two displays. -TEST_F(MouseCursorEventFilterTest, MAYBE_WarpMouse) { +TEST_F(MouseCursorEventFilterTest, WarpMouse) { UpdateDisplay("500x500,500x500"); MouseCursorEventFilter* event_filter = @@ -109,10 +92,9 @@ TEST_F(MouseCursorEventFilterTest, MAYBE_WarpMouse) { EXPECT_FALSE(is_warped); } - // Verifies if the mouse pointer correctly moves to another display even when // two displays are not the same size. -TEST_F(MouseCursorEventFilterTest, MAYBE_WarpMouseDifferentSizeDisplays) { +TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentSizeDisplays) { UpdateDisplay("500x500,600x600"); // the second one is larger. MouseCursorEventFilter* event_filter = @@ -144,7 +126,7 @@ TEST_F(MouseCursorEventFilterTest, MAYBE_WarpMouseDifferentSizeDisplays) { // Verifies if the mouse pointer correctly moves between displays with // different scale factors. -TEST_F(MouseCursorEventFilterTest, MAYBE_WarpMouseDifferentScaleDisplays) { +TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentScaleDisplays) { UpdateDisplay("500x500,600x600*2"); MouseCursorEventFilter* event_filter = @@ -177,7 +159,7 @@ TEST_F(MouseCursorEventFilterTest, MAYBE_WarpMouseDifferentScaleDisplays) { } // Verifies if MouseCursorEventFilter::set_mouse_warp_mode() works as expected. -TEST_F(MouseCursorEventFilterTest, MAYBE_SetMouseWarpModeFlag) { +TEST_F(MouseCursorEventFilterTest, SetMouseWarpModeFlag) { UpdateDisplay("500x500,500x500"); MouseCursorEventFilter* event_filter = @@ -324,11 +306,10 @@ TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnTopBottom) { event_filter->HideSharedEdgeIndicator(); } - // Verifies cursor's device scale factor is updated when a cursor has moved // across root windows with different device scale factors // (http://crbug.com/154183). -TEST_F(MouseCursorEventFilterTest, MAYBE_CursorDeviceScaleFactor) { +TEST_F(MouseCursorEventFilterTest, CursorDeviceScaleFactor) { UpdateDisplay("400x400,800x800*2"); DisplayController* controller = Shell::GetInstance()->display_controller(); |