RESOLVED FIXED Bug 194900
Add tests mixing programmatic and user frame scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=194900
Summary Add tests mixing programmatic and user frame scrolling on iOS
Frédéric Wang (:fredw)
Reported 2019-02-21 07:51:58 PST
Add more tests for programmatic frame scrolling on iOS
Attachments
Patch (10.94 KB, patch)
2019-02-21 07:54 PST, Frédéric Wang (:fredw)
no flags
Patch (22.74 KB, patch)
2019-02-25 08:23 PST, Frédéric Wang (:fredw)
no flags
Frédéric Wang (:fredw)
Comment 1 2019-02-21 07:54:12 PST
Frédéric Wang (:fredw)
Comment 2 2019-02-22 09:08:16 PST
review ping?
Simon Fraser (smfr)
Comment 3 2019-02-22 10:24:17 PST
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=&quot;green&quot;'></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.
Frédéric Wang (:fredw)
Comment 4 2019-02-25 06:41:36 PST
(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=&quot;green&quot;'></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.
Frédéric Wang (:fredw)
Comment 5 2019-02-25 07:37:03 PST
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.
Frédéric Wang (:fredw)
Comment 6 2019-02-25 08:23:21 PST
Antti Koivisto
Comment 7 2019-02-25 09:56:50 PST
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.
Frédéric Wang (:fredw)
Comment 8 2019-02-25 10:00:41 PST
(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.
WebKit Commit Bot
Comment 9 2019-02-25 10:26:14 PST
Comment on attachment 362904 [details] Patch Clearing flags on attachment: 362904 Committed r242046: <https://trac.webkit.org/changeset/242046>
WebKit Commit Bot
Comment 10 2019-02-25 10:26:16 PST
All reviewed patches have been landed. Closing bug.
Antti Koivisto
Comment 11 2019-02-25 10:27:34 PST
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.
Radar WebKit Bug Importer
Comment 12 2019-02-25 10:39:19 PST
Radar WebKit Bug Importer
Comment 13 2019-02-25 10:39:19 PST
Note You need to log in before you can comment on or make changes to this bug.