Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/audio-autoplay-experiment-modes.html |
| diff --git a/third_party/WebKit/LayoutTests/media/audio-autoplay-experiment-modes.html b/third_party/WebKit/LayoutTests/media/audio-autoplay-experiment-modes.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d79ae4188b144c9b967b05e6ad2c5c5735e22d8c |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/audio-autoplay-experiment-modes.html |
| @@ -0,0 +1,81 @@ |
| +<html> |
| +<video autoplay controls></video> |
| +<script src=media-file.js></script> |
| +<!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| + (Please avoid writing new tests using video-test.js) --> |
| +<script src=video-test.js></script> |
| +<script src=autoplay-experiment-helper.js></script> |
| +<body> |
| +<pre> |
| + Check if the autoplay gesture override experiment works. There are a lot |
| + of config options, so this test just runs all of them. |
| + |
| + The "results" table contains one row per config tested. |
| + == Test Inputs == |
|
liberato (no reviews please)
2016/05/03 15:45:23
this should probably move into the js too.
|
| + # - config number, in case you'd like to run just one. |
| + Flags - autoplay experiment setting being tested. |
| + a - "foraudio" |
| + v - "forvideo" |
| + V - "ifviewport" |
| + P - "ifpagevisible" |
| + M - "ifmuted" |
| + p - "playmuted" |
| + m - "ifmobile" |
| + For example, vM means '-forvideo-ifmuted". |
| + Type - audio or video element? |
| + audio - <audio> |
| + video - <video> |
| + Play w/- how is play requested? |
| + none - play is not requested. |
| + attr - autoplay attribute is set on the element. |
| + play() - play() called after media is ready to play. |
| + Mute - how is media muted? |
| + no - media is not muted. |
| + yes - muted attribute is set on the element. |
| + Mobile - is page optimized for mobile? |
| + no - page is not optimized for mobile. |
| + yes - page is optimized for mobile. |
| + View - is media in viewport? |
| + onscreen - element starts out onscreen. |
| + scroll - element starts offscreen, scrolled into view once |
| + it is ready to play. |
| + offscreen - element starts out offscreen and stays offscreen. |
| + obscured - onscreen but page is not visible. |
| + Setting - autoplay settings value |
| + enabled - content settings enables autoplay |
| + disabled - content settings disables autoplay |
| + |
| + == Test Outputs == |
| + Early? - did playback start before element was scrolled onscreen? For |
| + tests in which View!=scroll, this is reported as "-". |
| + Played? - did playback start by the conclusion of the test? |
| + Muted? - was the media muted? If the media didn't play, then this is |
| + reported as "-". |
| + |
| +</pre> |
| +<table id="results"> |
| +<tr> |
| +<td>#</td> |
| +<td>Flags</td> |
| +<td>Type</td> |
| +<td>Play w/</td> |
| +<td>Mute</td> |
| +<td>Mobile</td> |
| +<td>View</td> |
| +<td>Setting</td> |
| +<td>Early?</td> |
| +<td>Played?</td> |
| +<td>Muted?</td> |
| +</tr> |
| +</table> |
| +</body> |
| + |
| +<script> |
| + |
| +start('audio', [ 'none', |
| + 'enabled-forvideo', |
| + 'enabled-foraudio', |
| + 'enabled-foraudio-ifviewport']); |
| + |
| +</script> |
| +</html> |