diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 20:48:01 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 20:48:01 +0000 |
commit | fca26bb7f954de3dd4ca83556b5b22f019a7c7bc (patch) | |
tree | 9859ae157a852547057b68e6f8abf81df08de83e /ash/test | |
parent | fe9f89a741d5939d0b59f06876d4a1ec4a45b8e3 (diff) | |
download | chromium_src-fca26bb7f954de3dd4ca83556b5b22f019a7c7bc.zip chromium_src-fca26bb7f954de3dd4ca83556b5b22f019a7c7bc.tar.gz chromium_src-fca26bb7f954de3dd4ca83556b5b22f019a7c7bc.tar.bz2 |
Revert 157597 - Enable UpdateDisplay to specify host origins.
UpdateDisplayWithHostOrigin test fails on Win Aura.
----
This is needed for testing coordinate conversions by way of native screen
coordinates.
BUG=148686
Review URL: https://chromiumcodereview.appspot.com/10914308
TBR=mazda@chromium.org
Review URL: https://codereview.chromium.org/10945035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/ash_test_base.cc | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index 2209b61..1676d36 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc @@ -97,26 +97,16 @@ void AshTestBase::UpdateDisplay(const std::string& display_specs) { display_manager->SetDisplayIdsForTest(&displays); display_manager->OnNativeDisplaysChanged(displays); - bool is_host_origin_set = false; - for (size_t i = 0; i < displays.size(); ++i) { - if (displays[i].bounds_in_pixel().origin() != gfx::Point(0, 0)) { - is_host_origin_set = true; - break; - } - } - // On non-testing environment, when a secondary display is connected, a new // native (i.e. X) window for the display is always created below the previous - // one for GPU performance reasons. Try to emulate the behavior unless host - // origins are explicitly set. - if (!is_host_origin_set) { - Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); - int next_y = 0; - for (size_t i = 0; i < root_windows.size(); ++i) { - const gfx::Size size = root_windows[i]->GetHostSize(); - root_windows[i]->SetHostBounds(gfx::Rect(gfx::Point(0, next_y), size)); - next_y += size.height(); - } + // one for GPU performance reasons. Try to emulate the behavior. + Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); + DCHECK_EQ(displays.size(), root_windows.size()); + size_t next_y = 0; + for (size_t i = 0; i < root_windows.size(); ++i) { + const gfx::Size size = root_windows[i]->GetHostSize(); + root_windows[i]->SetHostBounds(gfx::Rect(gfx::Point(0, next_y), size)); + next_y += size.height(); } } |