Bug 167385

Summary: [ios-simulator] API test WebKit2.WebsitePoliciesAutoplayEnabled timing out
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, jer.noble, mrajca
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: iOS 10   
Attachments:
Description Flags
Patch none

Description Ryan Haddad 2017-01-24 14:40:08 PST
[ios-simulator] API test WebKit2.WebsitePoliciesAutoplayEnabled timing out

https://build.webkit.org/builders/Apple%20iOS%2010%20Simulator%20Debug%20WK2%20%28Tests%29/builds/2891
Comment 1 Ryan Haddad 2017-01-24 14:40:44 PST
The test was added with https://trac.webkit.org/changeset/211097
Comment 2 Matt Rajca 2017-01-24 15:47:40 PST
The JS used timeouts in the HTML test files might just have to be increased from 100 ms. Is there a way to test this without making a commit? I don't think EWS runs API tests.
Comment 3 Ryan Haddad 2017-01-24 15:52:52 PST
(In reply to comment #2)
> The JS used timeouts in the HTML test files might just have to be increased
> from 100 ms. Is there a way to test this without making a commit? I don't
> think EWS runs API tests.

If you have a build for the simulator, you can run API tests locally with:

./Tools/Scripts/run-api-tests --verbose --ios-simulator
Comment 4 Ryan Haddad 2017-01-24 15:56:02 PST
> If you have a build for the simulator, you can run API tests locally with:
> 
> ./Tools/Scripts/run-api-tests --verbose --ios-simulator

Actually, make that:

./Tools/Scripts/run-api-tests --no-build --verbose --ios-simulator WebKit2.WebsitePoliciesAutoplayEnabled
Comment 5 Alexey Proskuryakov 2017-01-24 23:21:00 PST
This test expects "did-no-play" three times, so increasing the timeout would have quite  cost.

Isn't there a better way to detect the condition? Her would know for sure.
Comment 6 Alexey Proskuryakov 2017-01-24 23:21:27 PST
*Jer*!
Comment 7 Jer Noble 2017-01-25 09:08:20 PST
(In reply to comment #6)
> *Jer*!

Calling video.play() will now return a Promise, which will reject if playback is not allowed.  Seems like the test could use that rather than waiting to see if playback doesn't start.
Comment 8 Matt Rajca 2017-01-25 15:10:29 PST
Created attachment 299753 [details]
Patch
Comment 9 WebKit Commit Bot 2017-01-25 15:44:19 PST
Comment on attachment 299753 [details]
Patch

Clearing flags on attachment: 299753

Committed r211174: <http://trac.webkit.org/changeset/211174>
Comment 10 WebKit Commit Bot 2017-01-25 15:44:23 PST
All reviewed patches have been landed.  Closing bug.