| Test that, when RequireUserGestureForAudioRateChange is set along with MediaUserGestureInheritsForDocument, nested setTimeout() calls of less than 1s will not block play() from succeeding. |
| |
| |
| RUN(mediaElement.src = findMediaFile('audio', 'content/test')) |
| EVENT(canplaythrough) |
| Test > 1s in single step |
| setTimeout 1, 1.1s |
| RUN(shouldReject(mediaElement.play()).then(next, next)) |
| Promise rejected correctly OK |
| |
| RUN(mediaElement.src = findMediaFile('audio', 'content/test')) |
| EVENT(canplaythrough) |
| Test > 1s in multiple steps |
| setTimeout 1, 0.6s |
| setTimeout 1, 0.6s |
| RUN(shouldReject(mediaElement.play()).then(next, next)) |
| Promise rejected correctly OK |
| |
| RUN(mediaElement.src = findMediaFile('audio', 'content/test')) |
| EVENT(canplaythrough) |
| Test < 1s total. |
| setTimeout 1, 0.1s |
| setTimeout 2, 0.1s |
| setTimeout 3, 0.1s |
| setTimeout 4, 0.1s |
| setTimeout 5, 0.1s |
| RUN(shouldResolve(mediaElement.play()).then(next, next)) |
| Promise resolved OK |
| END OF TEST |
| |