Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Issue 190723007: Fix tests to be compatible with Android scale initialization. (Closed)

Created:
6 years, 9 months ago by aelias_OOO_until_Jul13
Modified:
6 years, 6 months ago
Reviewers:
bokan
CC:
blink-reviews, wjmaclean
Visibility:
Public.

Description

Fix tests to be compatible with Android scale initialization. On Android, we never want to allow zooming out further than the content size. This behavior is currently guarded by the shrinksViewportContentToFit WebSetting. Fix the layout tests to be compatible with this setting in the future by expanding their body width. I also removed the viewportEnabled check to activate the behavior, which was redundant. Unit tests also need some changes to be compatible with the behavior to always zoom out to minimum scale on page load unless setPageScaleFactorLimits is called (which it always is in non-Android content_shell). I fixed most of them to call setPageScaleFactorLimits and deleted WebFrameTest.setPageScaleFactorBeforeFrameHasView (which made no sense). These changes will help prepare for better convergence of scaling behavior between platforms in the future. NOTRY=true BUG=350599 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173979

Patch Set 1 #

Patch Set 2 : Also fix unit tests #

Patch Set 3 : Rebaseline #

Patch Set 4 : Rebaseline #

Patch Set 5 : Reupload #

Total comments: 2

Patch Set 6 : Mark softwarecompositing clones as NeedsRebaseline #

Patch Set 7 : Attempt to fix WebViewTest.IsSelectionAnchorFirst on mac #

Patch Set 8 : More Mac NeedsRebaselines #

Patch Set 9 : Reupload #

Patch Set 10 : Noop patch for trybot test #

Patch Set 11 : Reapply #

Patch Set 12 : Patch necromancy #

Patch Set 13 : Remove substantive change, change only tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -36 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +17 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -5 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport-expected.html View 1 chunk +6 lines, -2 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled.html View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -1 line 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -1 line 0 comments Download
M LayoutTests/compositing/overflow/overflow-scaled-descendant-overlapping.html View 1 chunk +8 lines, -0 lines 0 comments Download
M LayoutTests/compositing/repaint/page-scale-repaint.html View 1 chunk +9 lines, -1 line 0 comments Download
M LayoutTests/fast/events/page-scaled-mouse-click.html View 1 chunk +7 lines, -1 line 0 comments Download
M LayoutTests/fast/events/page-scaled-mouse-click-iframe.html View 1 chunk +7 lines, -1 line 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-iframe-body.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-iframe-window.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/events/touch/page-scaled-touch-gesture-click.html View 2 chunks +5 lines, -1 line 0 comments Download
M LayoutTests/fast/frames/frame-set-rotation-hit.html View 2 chunks +7 lines, -2 lines 0 comments Download
M LayoutTests/fast/frames/frame-set-scaling-hit.html View 2 chunks +7 lines, -1 line 0 comments Download
M LayoutTests/fast/repaint/scale-page-shrink.html View 2 chunks +7 lines, -1 line 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/TouchActionTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -14 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
aelias_OOO_until_Jul13
Hi bokan, PTAL. This is just a bit of cleanup I've been wanting to do ...
6 years, 9 months ago (2014-03-08 01:39:32 UTC) #1
bokan
LGTM, thanks! https://codereview.chromium.org/190723007/diff/60001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (left): https://codereview.chromium.org/190723007/diff/60001/Source/web/tests/WebFrameTest.cpp#oldcode1567 Source/web/tests/WebFrameTest.cpp:1567: TEST_F(WebFrameTest, setPageScaleFactorBeforeFrameHasView) Is the reason this doesn't ...
6 years, 9 months ago (2014-03-10 14:21:17 UTC) #2
aelias_OOO_until_Jul13
https://codereview.chromium.org/190723007/diff/60001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (left): https://codereview.chromium.org/190723007/diff/60001/Source/web/tests/WebFrameTest.cpp#oldcode1567 Source/web/tests/WebFrameTest.cpp:1567: TEST_F(WebFrameTest, setPageScaleFactorBeforeFrameHasView) On 2014/03/10 14:21:18, bokan wrote: > Is ...
6 years, 9 months ago (2014-03-10 21:43:42 UTC) #3
aelias_OOO_until_Jul13
Resurrecting this patch as a test-only change. I never landed it because a mac_blink_rel test ...
6 years, 7 months ago (2014-05-13 02:47:45 UTC) #4
aelias_OOO_until_Jul13
The CQ bit was checked by aelias@chromium.org
6 years, 7 months ago (2014-05-13 18:48:43 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aelias@chromium.org/190723007/200001
6 years, 7 months ago (2014-05-13 18:49:09 UTC) #6
commit-bot: I haz the power
Change committed as 173979
6 years, 7 months ago (2014-05-13 18:51:12 UTC) #7
kenneth.christiansen
6 years, 6 months ago (2014-06-24 14:03:55 UTC) #8
Message was sent while issue was closed.
On 2014/05/13 18:51:12, I haz the power (commit-bot) wrote:
> Change committed as 173979

Not all of these tests are actually working if you turn on that setting. Like
you cannot set the size of a frameset.

The broken tests are

+fast/frames/frame-set-rotation-hit.html
+fast/frames/frame-set-scaling-hit.html

I don't know how to intent to fix them as, at least the former, depends on being
able to scale the frameset down. I don't really understand the test though

The comment in the test is: // Scale the page and resize the frames to verify
hit testing on the frameset

In a window of 800x600 it creates a frameset of 25,75% (200px, 600px) which it
then rotates 90 degrees in the middle and translates down 100px to start from
the top of the screen.

Meaning we now have 100px white space in both sides and from the top to the
button, 200px height frame1 followed by 600px height frame2. This is the result
that I get with the setting enabled.

Now after the scale adjustment (0.5 in 0,0), and the resulting image is scaled
but the frameset keeps its original size, ie you see frame1 still as 200px
height and then you only see 200px of frame2. 

I don't get why that is even correct (like iOS supported (still does?) frameset
and (with frame flattening) pinch zooming would just scale the frameset along.

Powered by Google App Engine
This is Rietveld 408576698