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

Issue 18546003: Fix tests to avoid page scale reset when setting page scale. (Closed)

Created:
7 years, 5 months ago by wjmaclean
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, jochen+watch_chromium.org, bokan
Visibility:
Public.

Description

Fix tests to avoid page scale reset when setting page scale. This CL fixes an error that breaks layout tests when an default override scale is specified for desk top. (See https://chromiumcodereview.appspot.com/17830003/). It also combines eventSender.scalePageBy and internals.setPageScaleFactor into a single call-location, eventSender.setPageScaleFactor. BUG=162482 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155784

Patch Set 1 #

Patch Set 2 : Fixed more tests. #

Patch Set 3 : Fixed more tests, hopefully that's all (on Linux). #

Total comments: 5

Patch Set 4 : Remove internals.setPageScaleFactor, rename eventSender.scalePageBy. #

Total comments: 2

Patch Set 5 : Remove page scale override function from EventSender. #

Total comments: 2

Patch Set 6 : Use setPageScaleFactorLimits(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -155 lines) Patch
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale-down.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport-expected.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-down.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-down.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/gestures/gesture-tapHighlight-simple-scaled-document.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M LayoutTests/compositing/overflow/overflow-scaled-descendant-overlapping.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/repaint/page-scale-repaint.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/scaling/tiled-layer-recursion.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/tiling/tile-cache-zoomed.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/css/sticky/sticky-top-zoomed.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/css/sticky/sticky-top-zoomed-expected.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/Element/scale-page-bounding-client-rect.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Element/scale-page-bounding-client-rect-in-frame.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Element/scale-page-client-rects.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Element/scale-page-client-rects-in-frame.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Range/scale-page-bounding-client-rect.html View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Range/scale-page-client-rects.html View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/elementFromPoint-scaled-scrolled.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/iframe-inner-size-scaling.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/window-inner-size-scaling.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/window-scroll-scaling.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/zoom-scroll-page-test.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/events/resize-events.html View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/resize-events-fixed-layout.html View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-body.html View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-div.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-iframe-body.html View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-iframe-window.html View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/scale-and-scroll-window.html View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M LayoutTests/fast/events/script-tests/page-scaled-mouse-click.js View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/events/script-tests/page-scaled-mouse-click-iframe.js View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-div-scaled.html View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/touch/page-scaled-touch-gesture-click.html View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/touch/touch-scaled-scrolled.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/frames/frame-set-rotation-hit.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/frames/frame-set-scaling-hit.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/frames/iframe-double-scale-contents.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/background-scaling.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/fixed-in-page-scale.html View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/repaint/fixed-right-in-page-scale.html View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/repaint/relayout-fixed-position-after-scale.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/repaint/scale-page-shrink.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/text/descent-clip-in-scaled-page.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/text/descent-clip-in-scaled-page-expected.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/inspector/elements/highlight-node-scaled.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/svg/as-background-image/tiled-background-image.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/svg/as-background-image/tiled-background-image-expected.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/svg/as-image/image-respects-pageScaleFactor.html View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/svg/as-image/image-respects-pageScaleFactor-change.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/testing/Internals.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/testing/runner/EventSender.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/testing/runner/EventSender.cpp View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
wjmaclean
aelias@ - can you please take a look and see if this is reasonable? This ...
7 years, 5 months ago (2013-07-02 16:04:28 UTC) #1
wjmaclean
Found that the other failing tests seem to directly set the page scale factor without ...
7 years, 5 months ago (2013-07-02 17:14:59 UTC) #2
wjmaclean
After running layout tests locally (on Linux) came up with three more tests that fail ...
7 years, 5 months ago (2013-07-02 18:46:14 UTC) #3
jochen (gone - plz use gerrit)
https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html File LayoutTests/fast/events/scale-and-scroll-iframe-body.html (left): https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html#oldcode28 LayoutTests/fast/events/scale-and-scroll-iframe-body.html:28: window.internals.setPageScaleFactor(scaleFactor, scaleOffset, scaleOffset); should we delete window.internals.setPageScaleFactor entirely?
7 years, 5 months ago (2013-07-02 19:03:55 UTC) #4
wjmaclean
On 2013/07/02 19:03:55, jochen wrote: > https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html > File LayoutTests/fast/events/scale-and-scroll-iframe-body.html (left): > > https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html#oldcode28 > ...
7 years, 5 months ago (2013-07-02 19:06:03 UTC) #5
wjmaclean
On 2013/07/02 19:06:03, wjmaclean wrote: > On 2013/07/02 19:03:55, jochen wrote: > > > https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html ...
7 years, 5 months ago (2013-07-02 19:52:50 UTC) #6
aelias_OOO_until_Jul13
https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html File LayoutTests/fast/events/scale-and-scroll-iframe-body.html (left): https://codereview.chromium.org/18546003/diff/7001/LayoutTests/fast/events/scale-and-scroll-iframe-body.html#oldcode28 LayoutTests/fast/events/scale-and-scroll-iframe-body.html:28: window.internals.setPageScaleFactor(scaleFactor, scaleOffset, scaleOffset); On 2013/07/02 19:03:55, jochen wrote: > ...
7 years, 5 months ago (2013-07-02 22:59:33 UTC) #7
wjmaclean
> Yes, I think we should converge to a single page-scale-factor-setting call in > the ...
7 years, 5 months ago (2013-07-03 14:12:23 UTC) #8
wjmaclean
I've used the approach suggested by aelias@, and fixed the problematic tests by suppressing the ...
7 years, 5 months ago (2013-07-05 14:03:23 UTC) #9
aelias_OOO_until_Jul13
https://codereview.chromium.org/18546003/diff/7001/Source/WebKit/chromium/src/WebViewImpl.cpp File Source/WebKit/chromium/src/WebViewImpl.cpp (right): https://codereview.chromium.org/18546003/diff/7001/Source/WebKit/chromium/src/WebViewImpl.cpp#newcode2876 Source/WebKit/chromium/src/WebViewImpl.cpp:2876: m_pageScaleConstraintsSet.setNeedsReset(false); On 2013/07/03 14:12:23, wjmaclean wrote: > OK, but ...
7 years, 5 months ago (2013-07-08 00:53:20 UTC) #10
wjmaclean
This new cl addresses all outstanding comments (I think!). https://codereview.chromium.org/18546003/diff/16001/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h File Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h (right): https://codereview.chromium.org/18546003/diff/16001/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h#newcode89 Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h:89: ...
7 years, 4 months ago (2013-08-06 06:38:00 UTC) #11
aelias_OOO_until_Jul13
https://codereview.chromium.org/18546003/diff/22001/Source/testing/runner/EventSender.cpp File Source/testing/runner/EventSender.cpp (right): https://codereview.chromium.org/18546003/diff/22001/Source/testing/runner/EventSender.cpp#newcode788 Source/testing/runner/EventSender.cpp:788: webview()->setInitialPageScaleOverride(-1); Could you change this to webview()->setPageScaleFactorLimits(scaleFactor, scaleFactor)? The ...
7 years, 4 months ago (2013-08-06 17:17:45 UTC) #12
wjmaclean
PTAL https://codereview.chromium.org/18546003/diff/22001/Source/testing/runner/EventSender.cpp File Source/testing/runner/EventSender.cpp (right): https://codereview.chromium.org/18546003/diff/22001/Source/testing/runner/EventSender.cpp#newcode788 Source/testing/runner/EventSender.cpp:788: webview()->setInitialPageScaleOverride(-1); On 2013/08/06 17:17:46, aelias wrote: > Could ...
7 years, 4 months ago (2013-08-07 00:41:11 UTC) #13
aelias_OOO_until_Jul13
lgtm, thanks. jochen@, could you review for OWNERS?
7 years, 4 months ago (2013-08-07 00:45:20 UTC) #14
jochen (gone - plz use gerrit)
lgtm
7 years, 4 months ago (2013-08-07 02:09:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/18546003/28001
7 years, 4 months ago (2013-08-08 12:35:45 UTC) #16
commit-bot: I haz the power
7 years, 4 months ago (2013-08-08 20:46:59 UTC) #17
Message was sent while issue was closed.
Change committed as 155784

Powered by Google App Engine
This is Rietveld 408576698