Add more tests for programmatic frame scrolling on iOS
Created attachment 362605 [details] Patch
review ping?
Comment on attachment 362605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362605&action=review > LayoutTests/fast/scrolling/ios/hit-testing-iframe.html:110 > + <iframe id="clickElementInsideFrameAfterProgrammaticScroll" style="left: 100px; top: 100px;" scrolling="yes" onclick="this.style.background='red'" srcdoc=" > + <body style='margin: 0; width: 200px; height: 200px; background: green;'> > + <div style='position: absolute; width: 75px; height: 75px; background: red;'></div> > + <div style='position: absolute; left: 110px; top: 110px; width: 50px; height: 50px; background: red;' > + onclick='this.style.background="green"'></div> > + </body>" onload="newFrameLoaded()"> > + </iframe> I don't like tests that do multiple different things. It's really hard to debug them, and when the test breaks, you have to spend time investigating to see which part broke. I think this should be broken into 6(?) different tests.
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 362605 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=362605&action=review > > > LayoutTests/fast/scrolling/ios/hit-testing-iframe.html:110 > > + <iframe id="clickElementInsideFrameAfterProgrammaticScroll" style="left: 100px; top: 100px;" scrolling="yes" onclick="this.style.background='red'" srcdoc=" > > + <body style='margin: 0; width: 200px; height: 200px; background: green;'> > > + <div style='position: absolute; width: 75px; height: 75px; background: red;'></div> > > + <div style='position: absolute; left: 110px; top: 110px; width: 50px; height: 50px; background: red;' > > + onclick='this.style.background="green"'></div> > > + </body>" onload="newFrameLoaded()"> > > + </iframe> > > I don't like tests that do multiple different things. It's really hard to > debug them, and when the test breaks, you have to spend time investigating > to see which part broke. I think this should be broken into 6(?) different > tests. For hit-testing.html, I moved that task to bug 195003. I'll try and split the new one on this bug.
Comment on attachment 362605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362605&action=review > LayoutTests/fast/scrolling/ios/mixing-user-and-programmatic-scroll.html:83 > + var frameToLoadCount = 1; Oops, this seems wrong.
Created attachment 362904 [details] Patch
Comment on attachment 362904 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362904&action=review > LayoutTests/fast/scrolling/ios/mixing-user-and-programmatic-scroll-005.html:37 > + await waitPromise(1000); // Wait for scrolling to stabilize. It is bit sad that these tests are so slow to run.
(In reply to Antti Koivisto from comment #7) > Comment on attachment 362904 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=362904&action=review > > > LayoutTests/fast/scrolling/ios/mixing-user-and-programmatic-scroll-005.html:37 > > + await waitPromise(1000); // Wait for scrolling to stabilize. > > It is bit sad that these tests are so slow to run. Right, not sure how to improve this, though.
Comment on attachment 362904 [details] Patch Clearing flags on attachment: 362904 Committed r242046: <https://trac.webkit.org/changeset/242046>
All reviewed patches have been landed. Closing bug.
We should add testing API that simulates user scroll without using UI scripting. I have a patch along those lines. It is good to have some tests doing real scrolling though.
<rdar://problem/48368245>
<rdar://problem/48368246>