diff options
author | dglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-30 03:31:02 +0000 |
---|---|---|
committer | dglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-30 03:31:02 +0000 |
commit | 92650169bc3855e20bbff2d0df8c5f08ebc848d5 (patch) | |
tree | d82d3e8a9ee93b02a05af0bc62182ebf23b22cb0 /content/renderer/render_view_impl.cc | |
parent | 6eb23091cec28cb4be27a036b790da8fcf71803f (diff) | |
download | chromium_src-92650169bc3855e20bbff2d0df8c5f08ebc848d5.zip chromium_src-92650169bc3855e20bbff2d0df8c5f08ebc848d5.tar.gz chromium_src-92650169bc3855e20bbff2d0df8c5f08ebc848d5.tar.bz2 |
Plumb a testing-only API for forcing resizes.
In the new world of unicorns and rainbow, the layout tests
will actually use the same machinery as the rest of Chromium
for window resizing, but there is still one ... uhm,
forcing function that still needs to be invoked at the beginning
of each test to eliminate any possibilities of tests affecting
each other. This function is RenderWidget::ResizeSynchronously,
with complementary plumbing.
BUG=309760
R=jam, jochen, tony
Review URL: https://codereview.chromium.org/47973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_view_impl.cc')
-rw-r--r-- | content/renderer/render_view_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index cca0524..3f79c62 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -6553,6 +6553,14 @@ void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { OnResize(params); } +void RenderViewImpl::ForceResizeForTesting(const gfx::Size& new_size) { + gfx::Rect new_position(rootWindowRect().x, + rootWindowRect().y, + new_size.width(), + new_size.height()); + ResizeSynchronously(new_position); +} + void RenderViewImpl::UseSynchronousResizeModeForTesting(bool enable) { resizing_mode_selector_->set_is_synchronous_mode(enable); } |