OLD | NEW |
(Empty) | |
| 1 CONSOLE WARNING: Failed to execute 'play' on 'HTMLMediaElement': API can only be
initiated by a user gesture. |
| 2 Test the play() behaviour with regards to the returned promise for media element
s. |
| 3 |
| 4 |
| 5 playBeforeCanPlay() |
| 6 RUN(mediaElement = document.createElement('audio')) |
| 7 RUN(mediaElement.src = 'content/test.wav') |
| 8 EXPECTED (mediaElement.readyState == '0') OK |
| 9 play() |
| 10 EVENT(loadedmetadata) |
| 11 EVENT(loadeddata) |
| 12 EVENT(canplay) |
| 13 EVENT(playing) |
| 14 arguments.length: 1 |
| 15 Promise resolved with undefined |
| 16 |
| 17 playWhenCanPlay() |
| 18 RUN(mediaElement = document.createElement('audio')) |
| 19 RUN(mediaElement.src = 'content/test.wav') |
| 20 EVENT(canplay) |
| 21 EXPECTED (mediaElement.readyState >= '3') OK |
| 22 EXPECTED (mediaElement.paused == 'true') OK |
| 23 play() |
| 24 EVENT(playing) |
| 25 arguments.length: 1 |
| 26 Promise resolved with undefined |
| 27 |
| 28 playAfterPlaybackStarted() |
| 29 RUN(mediaElement = document.createElement('audio')) |
| 30 RUN(mediaElement.src = 'content/test.wav') |
| 31 EVENT(canplaythrough) |
| 32 RUN(mediaElement.play()) |
| 33 EVENT(playing) |
| 34 EXPECTED (mediaElement.readyState == '4') OK |
| 35 EXPECTED (mediaElement.paused == 'false') OK |
| 36 play() |
| 37 arguments.length: 1 |
| 38 Promise resolved with undefined |
| 39 |
| 40 playRequiresUserGestureAndHasIt() |
| 41 RUN(mediaElement = document.createElement('audio')) |
| 42 RUN(mediaElement.src = 'content/test.wav') |
| 43 play() |
| 44 EVENT(playing) |
| 45 arguments.length: 1 |
| 46 Promise resolved with undefined |
| 47 |
| 48 playRequiresUserGestureAndDoesNotHaveIt() |
| 49 RUN(mediaElement = document.createElement('audio')) |
| 50 RUN(mediaElement.src = 'content/test.wav') |
| 51 play() |
| 52 arguments.length: 1 |
| 53 Promise failed with NotAllowedError: play() can only be initiated by a user gest
ure. |
| 54 |
| 55 playNotSupportedContent() |
| 56 RUN(mediaElement = document.createElement('audio')) |
| 57 RUN(mediaElement.src = 'data:,.wav') |
| 58 play() |
| 59 EVENT(error) |
| 60 EXPECTED (mediaElement.error == '[object MediaError]') OK |
| 61 EXPECTED (mediaElement.error.code == '4') OK |
| 62 arguments.length: 1 |
| 63 Promise failed with NotSupportedError: Failed to load because no supported sourc
e was found. |
| 64 |
| 65 playDecodeError() |
| 66 RUN(mediaElement = document.createElement('audio')) |
| 67 RUN(mediaElement.src = 'content/test.wav') |
| 68 EVENT(loadedmetadata) |
| 69 play() |
| 70 EVENT(error) |
| 71 EXPECTED (mediaElement.error == '[object MediaError]') OK |
| 72 EXPECTED (mediaElement.error.code == '3') OK |
| 73 EVENT(playing) |
| 74 arguments.length: 1 |
| 75 Promise resolved with undefined |
| 76 |
| 77 playNetworkError() |
| 78 RUN(mediaElement = document.createElement('audio')) |
| 79 RUN(mediaElement.src = 'content/test.wav') |
| 80 EVENT(loadedmetadata) |
| 81 play() |
| 82 EVENT(error) |
| 83 EXPECTED (mediaElement.error == '[object MediaError]') OK |
| 84 EXPECTED (mediaElement.error.code == '2') OK |
| 85 EVENT(playing) |
| 86 arguments.length: 1 |
| 87 Promise resolved with undefined |
| 88 |
| 89 playWithErrorAlreadySet() |
| 90 RUN(mediaElement = document.createElement('audio')) |
| 91 RUN(mediaElement.src = 'data:,.wav') |
| 92 EVENT(error) |
| 93 EXPECTED (mediaElement.error == '[object MediaError]') OK |
| 94 EXPECTED (mediaElement.error.code == '4') OK |
| 95 play() |
| 96 arguments.length: 1 |
| 97 Promise failed with NotSupportedError: The element has no supported sources. |
| 98 |
| 99 playSrcChangedAfterError() |
| 100 RUN(mediaElement = document.createElement('audio')) |
| 101 RUN(mediaElement.src = 'data:,.wav') |
| 102 EVENT(error) |
| 103 EXPECTED (mediaElement.error == '[object MediaError]') OK |
| 104 EXPECTED (mediaElement.error.code == '4') OK |
| 105 RUN(mediaElement.src = 'content/test.wav') |
| 106 EVENT(loadedmetadata) |
| 107 play() |
| 108 EVENT(playing) |
| 109 arguments.length: 1 |
| 110 Promise resolved with undefined |
| 111 |
| 112 playRaceWithSrcChangeError() |
| 113 RUN(mediaElement = document.createElement('audio')) |
| 114 RUN(mediaElement.src = 'data:,.wav') |
| 115 EVENT(error) |
| 116 EXPECTED (mediaElement.error == '[object MediaError]') OK |
| 117 EXPECTED (mediaElement.error.code == '4') OK |
| 118 RUN(mediaElement.src = 'content/test.wav') |
| 119 EXPECTED (mediaElement.error == 'null') OK |
| 120 EXPECTED (mediaElement.readyState == '0') OK |
| 121 play() |
| 122 EVENT(playing) |
| 123 arguments.length: 1 |
| 124 Promise resolved with undefined |
| 125 |
| 126 playAndPauseWhenCanPlay() |
| 127 RUN(mediaElement = document.createElement('audio')) |
| 128 RUN(mediaElement.src = 'content/test.wav') |
| 129 EVENT(canplaythrough) |
| 130 EXPECTED (mediaElement.readyState == '4') OK |
| 131 play() |
| 132 EXPECTED (mediaElement.paused == 'false') OK |
| 133 EXPECTED (mediaElement.paused == 'true') OK |
| 134 EVENT(playing) |
| 135 arguments.length: 1 |
| 136 Promise resolved with undefined |
| 137 |
| 138 playAndPauseBeforeCanPlay() |
| 139 RUN(mediaElement = document.createElement('audio')) |
| 140 EXPECTED (mediaElement.readyState == '0') OK |
| 141 play() |
| 142 EXPECTED (mediaElement.paused == 'false') OK |
| 143 EXPECTED (mediaElement.paused == 'true') OK |
| 144 arguments.length: 1 |
| 145 Promise failed with AbortError: The play() request was interrupted by a call to
pause(). |
| 146 |
| 147 loadRejectsPendingPromises() |
| 148 RUN(mediaElement = document.createElement('audio')) |
| 149 play() |
| 150 RUN(mediaElement.load()) |
| 151 arguments.length: 1 |
| 152 Promise failed with AbortError: The play() request was interrupted by a new load
request. |
| 153 |
| 154 newSrcRejectPendingPromises() |
| 155 RUN(mediaElement = document.createElement('audio')) |
| 156 play() |
| 157 RUN(mediaElement.src = 'content/test.wav') |
| 158 arguments.length: 1 |
| 159 Promise failed with AbortError: The play() request was interrupted by a new load
request. |
| 160 |
| 161 testEventAndPromiseOrdering |
| 162 RUN(mediaElement = document.createElement('audio')) |
| 163 RUN(mediaElement.src = 'data:,') |
| 164 EVENT(error) |
| 165 RUN(mediaElement.volume = 0.1) |
| 166 play() |
| 167 RUN(mediaElement.volume = 0.2) |
| 168 arguments.length: 1 |
| 169 Promise failed with NotSupportedError: The element has no supported sources. |
| 170 END OF TEST |
| 171 |
OLD | NEW |