Adding the 'autoplay' attribute to a media element during a user gesture should remove user gesture restrictions.
<rdar://problem/33205939>
Created attachment 315131 [details] Patch
Comment on attachment 315131 [details] Patch Attachment 315131 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4102447 New failing tests: media/video-add-autoplay-user-gesture.html
Created attachment 315148 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
(In reply to Build Bot from comment #3) > Comment on attachment 315131 [details] > Patch > > Attachment 315131 [details] did not pass ios-sim-ews (ios-simulator-wk2): > Output: http://webkit-queues.webkit.org/results/4102447 > > New failing tests: > media/video-add-autoplay-user-gesture.html Do we need the playsinline attribute for the test to work on iOS?
(In reply to Matt Rajca from comment #5) > (In reply to Build Bot from comment #3) > > Comment on attachment 315131 [details] > > Patch > > > > Attachment 315131 [details] did not pass ios-sim-ews (ios-simulator-wk2): > > Output: http://webkit-queues.webkit.org/results/4102447 > > > > New failing tests: > > media/video-add-autoplay-user-gesture.html > > Do we need the playsinline attribute for the test to work on iOS? Not for the LayoutTests; those shouldn't require the playsinline attribute. (Because that would break almost every media test.)
(In reply to Jer Noble from comment #6) > (In reply to Matt Rajca from comment #5) > > (In reply to Build Bot from comment #3) > > > Comment on attachment 315131 [details] > > > Patch > > > > > > Attachment 315131 [details] did not pass ios-sim-ews (ios-simulator-wk2): > > > Output: http://webkit-queues.webkit.org/results/4102447 > > > > > > New failing tests: > > > media/video-add-autoplay-user-gesture.html > > > > Do we need the playsinline attribute for the test to work on iOS? > > Not for the LayoutTests; those shouldn't require the playsinline attribute. > (Because that would break almost every media test.) Turns out the problem with iOS is that the WKTR EventSender is basically unwritten. It doesn't support sending mouse, key, or touch events, so our "do this during a user gesture" helper in video-test.js doesn't work.
I'll just skip this new test on iOS and land.
Created attachment 315433 [details] Patch for landing
Comment on attachment 315433 [details] Patch for landing Rejecting attachment 315433 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 315433, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: tform/ios/TestExpectations']" exit_code: 1 ERROR: LayoutTests/platform/ios/TestExpectations:2566: Path does not exist. [test/expectations] [5] Total errors found: 1 in 1 files Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/platform/ios/TestExpectations']" exit_code: 1 Updating OpenSource Current branch master is up to date. ERROR: LayoutTests/platform/ios/TestExpectations:2566: Path does not exist. [test/expectations] [5] Total errors found: 1 in 1 files Full output: http://webkit-queues.webkit.org/results/4120036
Created attachment 315440 [details] Patch for landing
Comment on attachment 315440 [details] Patch for landing Clearing flags on attachment: 315440 Committed r219509: <http://trac.webkit.org/changeset/219509>
All reviewed patches have been landed. Closing bug.
The test added in the revision is a flaky failure. It looks to have been flaky since being added. https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=media%2Fvideo-add-autoplay-user-gesture.html https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/r219562%20(2990)/results.html Diff: --- /Volumes/Data/slave/sierra-release-tests-wk2/build/layout-test-results/media/video-add-autoplay-user-gesture-expected.txt +++ /Volumes/Data/slave/sierra-release-tests-wk2/build/layout-test-results/media/video-add-autoplay-user-gesture-actual.txt @@ -3,6 +3,6 @@ RUN(video.src = findMediaFile("video", "content/test")) RUN(video.setAttribute("autoplay", "")) RUN(document.body.appendChild(video)) -EVENT(playing) +FAIL: did not end fast enough END OF TEST