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/root_window_controller_unittest.cc | |
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/root_window_controller_unittest.cc')
-rw-r--r-- | ash/root_window_controller_unittest.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc index af45230..06d7a166 100644 --- a/ash/root_window_controller_unittest.cc +++ b/ash/root_window_controller_unittest.cc @@ -117,7 +117,14 @@ class RootWindowControllerTest : public test::AshTestBase { } }; -TEST_F(RootWindowControllerTest, MoveWindows_Basic) { +#if defined(OS_WIN) +// Multiple displays are not supported on Windows Ash. http://crbug.com/165962 +#define MAYBE_MoveWindows_Basic DISABLED_MoveWindows_Basic +#else +#define MAYBE_MoveWindows_Basic MoveWindows_Basic +#endif + +TEST_F(RootWindowControllerTest, MAYBE_MoveWindows_Basic) { UpdateDisplay("600x600,500x500"); Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); internal::RootWindowController* controller = @@ -210,7 +217,14 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) { fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString()); } -TEST_F(RootWindowControllerTest, MoveWindows_Modal) { +#if defined(OS_WIN) +// Multiple displays are not supported on Windows Ash. http://crbug.com/165962 +#define MAYBE_MoveWindows_Modal DISABLED_MoveWindows_Modal +#else +#define MAYBE_MoveWindows_Modal MoveWindows_Modal +#endif + +TEST_F(RootWindowControllerTest, MAYBE_MoveWindows_Modal) { UpdateDisplay("500x500,500x500"); Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |