Bug 185599

Summary: [iOS] Add a test to ensure that setTimeout() does not fire more than expected when using UIWebView
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, lforschler, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: iOS 9.3   
Attachments:
Description Flags
Unit test simon.fraser: review+

Description Daniel Bates 2018-05-13 20:32:15 PDT
Add a test to ensure that setTimeout() fires once.
Comment 1 Daniel Bates 2018-05-13 20:32:34 PDT
<rdar://problem/22493890>
Comment 2 Daniel Bates 2018-05-13 20:41:39 PDT
Created attachment 340287 [details]
Unit test
Comment 3 Simon Fraser (smfr) 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?
Comment 4 Daniel Bates 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.
Comment 5 Daniel Bates 2018-05-14 16:19:44 PDT
Committed r231776: <https://trac.webkit.org/changeset/231776>