[webkit-reviews] review denied: [Bug 218757] Simplify mainframe tests tiled-drawing/scrolling/scroll-snap : [Attachment 413707] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 10 09:46:56 PST 2020


Simon Fraser (smfr) <simon.fraser at apple.com> has denied Martin Robinson
<mrobinson at webkit.org>'s request for review:
Bug 218757: Simplify mainframe tests tiled-drawing/scrolling/scroll-snap
https://bugs.webkit.org/show_bug.cgi?id=218757

Attachment 413707: Patch

https://bugs.webkit.org/attachment.cgi?id=413707&action=review




--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 413707
  --> https://bugs.webkit.org/attachment.cgi?id=413707
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=413707&action=review

>
LayoutTests/tiled-drawing/scrolling/scroll-snap/resources/mainframe-scroll-snap
-test.js:41
> +    var startPosX = targetElement.offsetLeft + 20;
> +    var startPosY = targetElement.offsetTop + 20;

This isn't going to work for something in side positioned elements. You need
getBoundingClientRect().

>
LayoutTests/tiled-drawing/scrolling/scroll-snap/resources/mainframe-scroll-snap
-test.js:60
> +function delay(time) {
> +    return new Promise(resolve => setTimeout(resolve, time));
> +}

This is the same as UIHelper.delayFor()

>
LayoutTests/tiled-drawing/scrolling/scroll-snap/resources/mainframe-scroll-snap
-test.js:62
> +function shortScrollShouldSnapBack(targetElement, direction) {

Brace on new line.

>
LayoutTests/tiled-drawing/scrolling/scroll-snap/resources/mainframe-scroll-snap
-test.js:70
> +function scrollGlideShouldScrollTo(targetElement, direction, expectedValue)
{

Brace on new line.

>
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe
-horizontal-legacy.html:36
> +	       delay(0)
> +		   .then(() =>
scrollGlideShouldScrollTo(document.scrollingElement, HORIZONTAL,
"window.innerWidth"))
> +		   .then(() => delay(0))
> +		   .then(() =>
shortScrollShouldSnapBack(document.scrollingElement, HORIZONTAL))
> +		   .finally(finishJSTest);

I much prefer async/await


More information about the webkit-reviews mailing list