RESOLVED FIXED 185599
[iOS] Add a test to ensure that setTimeout() does not fire more than expected when using UIWebView
https://bugs.webkit.org/show_bug.cgi?id=185599
Summary [iOS] Add a test to ensure that setTimeout() does not fire more than expected...
Daniel Bates
Reported 2018-05-13 20:32:15 PDT
Add a test to ensure that setTimeout() fires once.
Attachments
Unit test (11.93 KB, patch)
2018-05-13 20:41 PDT, Daniel Bates
simon.fraser: review+
Daniel Bates
Comment 1 2018-05-13 20:32:34 PDT
Daniel Bates
Comment 2 2018-05-13 20:41:39 PDT
Created attachment 340287 [details] Unit test
Simon Fraser (smfr)
Comment 3 2018-05-14 15:06:27 PDT
Comment on attachment 340287 [details] Unit test View in context: https://bugs.webkit.org/attachment.cgi?id=340287&action=review > Tools/TestWebKitAPI/ios/set-timeout-function.html:11 > +setTimeout(function() { i++; }, 0); > +setTimeout(function() { i++; }, 100); > +setTimeout(function() { > + i++; > + window.location.href = "?fired-" + i; > +}, 200); Can we make the test take less than 200ms?
Daniel Bates
Comment 4 2018-05-14 16:09:01 PDT
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 340287 [details] > Unit test > > View in context: > https://bugs.webkit.org/attachment.cgi?id=340287&action=review > > > Tools/TestWebKitAPI/ios/set-timeout-function.html:11 > > +setTimeout(function() { i++; }, 0); > > +setTimeout(function() { i++; }, 100); > > +setTimeout(function() { > > + i++; > > + window.location.href = "?fired-" + i; > > +}, 200); > > Can we make the test take less than 200ms? Will change to use 20ms before landing.
Daniel Bates
Comment 5 2018-05-14 16:19:44 PDT
Note You need to log in before you can comment on or make changes to this bug.