| 1 |
!! version 2 |
| 2 |
|
| 3 |
# Only run these tests if the TimedMediaHandler is loaded. |
| 4 |
!! hooks |
| 5 |
extension:TimedMediaHandler |
| 6 |
!! endhooks |
| 7 |
|
| 8 |
!! test |
| 9 |
Simple video element |
| 10 |
!! config |
| 11 |
wgParserEnableLegacyMediaDOM=false |
| 12 |
!! wikitext |
| 13 |
[[File:Video.ogv]] |
| 14 |
!! html/php |
| 15 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 16 |
</p> |
| 17 |
!! html/parsoid |
| 18 |
<p><span class="mw-default-size" typeof="mw:File"><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 19 |
!! end |
| 20 |
|
| 21 |
!! test |
| 22 |
Simple video element (legacy) |
| 23 |
!! config |
| 24 |
wgParserEnableLegacyMediaDOM=true |
| 25 |
!! wikitext |
| 26 |
[[File:Video.ogv]] |
| 27 |
!! html/php |
| 28 |
<p><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video> |
| 29 |
</p> |
| 30 |
!! html/parsoid |
| 31 |
<p><span class="mw-default-size" typeof="mw:File"><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 32 |
!! end |
| 33 |
|
| 34 |
!! test |
| 35 |
Simple thumbed video |
| 36 |
!! config |
| 37 |
wgParserEnableLegacyMediaDOM=false |
| 38 |
!! wikitext |
| 39 |
[[File:Video.ogv|thumb]] |
| 40 |
!! html/php |
| 41 |
<figure class="mw-default-size" typeof="mw:File/Thumb"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/180px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="180" height="135" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local" resource="/wiki/File:Video.ogv"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span><figcaption></figcaption></figure> |
| 42 |
!! html/parsoid |
| 43 |
<figure class="mw-default-size" typeof="mw:File/Thumb"><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/180px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="135" width="180" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span><figcaption></figcaption></figure> |
| 44 |
!! end |
| 45 |
|
| 46 |
!! test |
| 47 |
Simple thumbed video (legacy) |
| 48 |
!! config |
| 49 |
wgParserEnableLegacyMediaDOM=true |
| 50 |
!! wikitext |
| 51 |
[[File:Video.ogv|thumb]] |
| 52 |
!! html/php |
| 53 |
<div class="thumb tright"><div class="thumbinner" style="width:182px;"><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/180px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="thumbimage" width="180" height="135" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Video.ogv" class="internal" title="Enlarge"></a></div></div></div></div> |
| 54 |
!! html/parsoid |
| 55 |
<figure class="mw-default-size" typeof="mw:File/Thumb"><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/180px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="135" width="180" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span><figcaption></figcaption></figure> |
| 56 |
!! end |
| 57 |
|
| 58 |
!! test |
| 59 |
Simple video with border |
| 60 |
!! config |
| 61 |
wgParserEnableLegacyMediaDOM=false |
| 62 |
!! wikitext |
| 63 |
[[File:Video.ogv|border]] |
| 64 |
!! html/php |
| 65 |
<p><span class="mw-default-size mw-image-border" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 66 |
</p> |
| 67 |
!! html/parsoid |
| 68 |
<p><span class="mw-default-size mw-image-border" typeof="mw:File"><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 69 |
!! end |
| 70 |
|
| 71 |
!! test |
| 72 |
Video in a <gallery> |
| 73 |
!! config |
| 74 |
wgParserEnableLegacyMediaDOM=false |
| 75 |
!! wikitext |
| 76 |
<gallery> |
| 77 |
File:Video.ogv |
| 78 |
</gallery> |
| 79 |
!! html/php |
| 80 |
<ul class="gallery mw-gallery-traditional"> |
| 81 |
<li class="gallerybox" style="width: 155px"> |
| 82 |
<div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/120px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="120" height="90" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span></div> |
| 83 |
<div class="gallerytext"></div> |
| 84 |
</li> |
| 85 |
</ul> |
| 86 |
!! html/parsoid |
| 87 |
<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'> |
| 88 |
<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/120px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="90" width="120" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></div><div class="gallerytext"></div></li> |
| 89 |
</ul> |
| 90 |
!! end |
| 91 |
|
| 92 |
!! test |
| 93 |
Video with thumbtime=1:25 |
| 94 |
!! config |
| 95 |
wgParserEnableLegacyMediaDOM=false |
| 96 |
!! wikitext |
| 97 |
[[File:Video.ogv|thumbtime=1:25]] |
| 98 |
!! html/php |
| 99 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px-seek%3D3.367-Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 100 |
</p> |
| 101 |
!! html/parsoid |
| 102 |
<p><span class="mw-default-size" typeof="mw:File" data-mw='{"attribs":[["thumbtime",{"txt":"1:25"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px-seek%3D3.3666666666667-Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 103 |
!! end |
| 104 |
|
| 105 |
!! test |
| 106 |
Video with starttime offset |
| 107 |
!! config |
| 108 |
wgParserEnableLegacyMediaDOM=false |
| 109 |
!! wikitext |
| 110 |
[[File:Video.ogv|start=1:25]] |
| 111 |
!! html/php |
| 112 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px-seek%3D3.367-Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv#t=00:00:03.367" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 113 |
</p> |
| 114 |
!! html/parsoid |
| 115 |
<p><span class="mw-default-size" typeof="mw:File" data-mw='{"attribs":[["starttime",{"txt":"1:25"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px-seek%3D3.3666666666667-Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv#t=3.3666666666667" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 116 |
!! end |
| 117 |
|
| 118 |
!! test |
| 119 |
Video with starttime and endtime offsets |
| 120 |
!! config |
| 121 |
wgParserEnableLegacyMediaDOM=false |
| 122 |
!! wikitext |
| 123 |
[[File:Video.ogv|start=0:1.2|end=00:00:2.3]] |
| 124 |
!! html/php |
| 125 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px-seek%3D1.2-Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv#t=00:00:01.200,00:00:02.300" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 126 |
</p> |
| 127 |
!! html/parsoid |
| 128 |
<p><span class="mw-default-size" typeof="mw:File" data-mw='{"attribs":[["starttime",{"txt":"0:1.2"}],["endtime",{"txt":"00:00:2.3"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px-seek%3D1.2-Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv#t=1.2,2.3" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 129 |
!! end |
| 130 |
|
| 131 |
!! test |
| 132 |
Video with unsupported alt |
| 133 |
!! config |
| 134 |
wgParserEnableLegacyMediaDOM=false |
| 135 |
!! wikitext |
| 136 |
[[File:Video.ogv|alt=Test]] |
| 137 |
!! html/php |
| 138 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 139 |
</p> |
| 140 |
!! html/parsoid |
| 141 |
<p><span class="mw-default-size" typeof="mw:File" data-mw='{"attribs":[["alt",{"txt":"Test"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 142 |
!! end |
| 143 |
|
| 144 |
!! test |
| 145 |
Video with unsupported link |
| 146 |
!! config |
| 147 |
wgParserEnableLegacyMediaDOM=false |
| 148 |
!! wikitext |
| 149 |
[[File:Video.ogv|link=Example]] |
| 150 |
!! html/php |
| 151 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 152 |
</p> |
| 153 |
!! html/parsoid |
| 154 |
<p><span class="mw-default-size" typeof="mw:File" data-mw='{"attribs":[["link",{"txt":"Example"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 155 |
!! end |
| 156 |
|
| 157 |
!! test |
| 158 |
Video with different thumb image |
| 159 |
!! config |
| 160 |
wgParserEnableLegacyMediaDOM=false |
| 161 |
!! wikitext |
| 162 |
[[File:Video.ogv|thumbnail=Foobar.jpg]] |
| 163 |
!! html/php |
| 164 |
<figure typeof="mw:File/Thumb"><a href="/wiki/File:Video.ogv" title="File:Video.ogv"><img resource="/wiki/File:Video.ogv" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="mw-file-element" /></a><figcaption></figcaption></figure> |
| 165 |
!! html/parsoid |
| 166 |
<figure typeof="mw:File/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Foobar.jpg"}]]}'><a href="./File:Video.ogv" class="mw-file-description"><img resource="./File:Video.ogv" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Video.ogv","height":"220","width":"1941"},"sa":{"resource":"File:Video.ogv"}}' class="mw-file-element"/></a><figcaption></figcaption></figure> |
| 167 |
!! end |
| 168 |
|
| 169 |
!! test |
| 170 |
Video with different thumb image (legacy) |
| 171 |
!! config |
| 172 |
wgParserEnableLegacyMediaDOM=true |
| 173 |
!! wikitext |
| 174 |
[[File:Video.ogv|thumbnail=Foobar.jpg]] |
| 175 |
!! html/php |
| 176 |
<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Video.ogv" title="File:Video.ogv"><img alt="Video.ogv" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Video.ogv" class="internal" title="Enlarge"></a></div></div></div></div> |
| 177 |
!! html/parsoid |
| 178 |
<figure typeof="mw:File/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Foobar.jpg"}]]}'><a href="./File:Video.ogv" class="mw-file-description"><img resource="./File:Video.ogv" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Video.ogv","height":"220","width":"1941"},"sa":{"resource":"File:Video.ogv"}}' class="mw-file-element"/></a><figcaption></figcaption></figure> |
| 179 |
!! end |
| 180 |
|
| 181 |
!! test |
| 182 |
Image with video thumb |
| 183 |
!! config |
| 184 |
wgParserEnableLegacyMediaDOM=false |
| 185 |
!! wikitext |
| 186 |
[[File:Foobar.jpg|thumbnail=Video.ogv]] |
| 187 |
!! html/php |
| 188 |
<figure typeof="mw:File/Thumb"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local" resource="/wiki/File:Foobar.jpg"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span><figcaption></figcaption></figure> |
| 189 |
!! html/parsoid |
| 190 |
<figure typeof="mw:File/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Video.ogv"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Foobar.jpg" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span><figcaption></figcaption></figure> |
| 191 |
!! end |
| 192 |
|
| 193 |
!! test |
| 194 |
Simple audio element |
| 195 |
!! config |
| 196 |
wgParserEnableLegacyMediaDOM=false |
| 197 |
!! wikitext |
| 198 |
[[File:Audio.oga]] |
| 199 |
!! html/php |
| 200 |
<p><span class="mw-default-size" typeof="mw:File"><span><audio id="mwe_player_1" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="180" style="width:180px;" data-durationhint="1" data-mwtitle="Audio.oga" data-mwprovider="local"><source src="http://example.com/images/4/41/Audio.oga" type="audio/ogg; codecs="vorbis"" data-width="0" data-height="0" /></audio></span></span> |
| 201 |
</p> |
| 202 |
!! html/parsoid |
| 203 |
<p><span class="mw-default-size mw-default-audio-height" typeof="mw:File"><span><audio controls="" preload="none" data-mw-tmh="" height="32" width="180" style="width: 180px;" resource="./File:Audio.oga" data-durationhint="1" class="mw-file-element"><source src="http://example.com/images/4/41/Audio.oga" type='audio/ogg; codecs="vorbis"'/></audio></span></span></p> |
| 204 |
!! end |
| 205 |
|
| 206 |
## For backwards compatibility with Parsoid content versions up to 1.7.0 |
| 207 |
!! test |
| 208 |
Simple audio element, rendered as a video tag |
| 209 |
!! options |
| 210 |
parsoid=html2wt |
| 211 |
!! html/parsoid |
| 212 |
<p><span class="mw-default-size mw-default-audio-height" typeof="mw:Audio"><span><video poster="http://example.com/images/w/resources/assets/file-type-icons/fileicon-ogg.png" controls="" preload="none" height="32" width="220" resource="./File:Audio.oga"><source src="http://example.com/images/4/41/Audio.oga" type='audio/ogg; codecs="vorbis"'/></video></span></span></p> |
| 213 |
!! wikitext |
| 214 |
[[File:Audio.oga]] |
| 215 |
!! end |
| 216 |
|
| 217 |
!! test |
| 218 |
Flag disablecontrols as bogus options in Parsoid |
| 219 |
!! config |
| 220 |
wgParserEnableLegacyMediaDOM=false |
| 221 |
!! wikitext |
| 222 |
[[File:Video.ogv|disablecontrols=ok|These are bogus.]] |
| 223 |
!! html/php |
| 224 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 225 |
</p> |
| 226 |
!! html/parsoid |
| 227 |
<p><span class="mw-default-size" typeof="mw:File" data-parsoid='{"optList":[{"ck":"bogus","ak":"disablecontrols=ok"},{"ck":"caption","ak":"These are bogus."}]}' data-mw='{"caption":"These are bogus."}'><span title="These are bogus."><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 228 |
!! end |
| 229 |
|
| 230 |
!! test |
| 231 |
Video with flag muted and loop |
| 232 |
!! config |
| 233 |
wgParserEnableLegacyMediaDOM=false |
| 234 |
!! wikitext |
| 235 |
[[File:Video.ogv|muted|loop|These are bogus.]] |
| 236 |
!! html/php |
| 237 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" muted="" loop="" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 238 |
</p> |
| 239 |
!! html/parsoid |
| 240 |
<p><span class="mw-default-size" typeof="mw:File" data-mw='{"caption":"These are bogus."}'><span title="These are bogus."><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" muted="" loop="" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 241 |
!! end |
| 242 |
|
| 243 |
## FIXME: Mock transcoding on the php side as well |
| 244 |
!! test |
| 245 |
Video with a transcoded source |
| 246 |
!! config |
| 247 |
wgParserEnableLegacyMediaDOM=false |
| 248 |
!! wikitext |
| 249 |
[[File:Transcode.webm|thumb|Hello]] |
| 250 |
!! html/parsoid |
| 251 |
<figure class="mw-default-size" typeof="mw:File/Thumb"><span><video poster="http://example.com/images/thumb/0/09/Transcode.webm/180px--Transcode.webm.jpg" controls="" preload="none" data-mw-tmh="" height="132" width="180" resource="./File:Transcode.webm" data-durationhint="4" class="mw-file-element"><source src="http://example.com/images/0/09/Transcode.webm" type='video/webm; codecs="vp8, vorbis"' data-file-width="492" data-file-height="360"/><source src="http://example.com/images/transcoded/0/09/Transcode.webm/Transcode.webm.240p.vp9.webm" type='video/webm; codecs="vp9, opus"' data-width="328" data-height="240" data-transcodekey="240p.vp9.webm"/></video></span><figcaption>Hello</figcaption></figure> |
| 252 |
!! end |
| 253 |
|
| 254 |
!! test |
| 255 |
Video with markup in alt option |
| 256 |
!! config |
| 257 |
wgParserEnableLegacyMediaDOM=false |
| 258 |
!! wikitext |
| 259 |
[[File:Video.ogv|alt=testing '''bold''' in alt]] |
| 260 |
!! html/php |
| 261 |
<p><span class="mw-default-size" typeof="mw:File"><span><video id="mwe_player_1" poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="320" height="240" data-durationhint="5" data-mwtitle="Video.ogv" data-mwprovider="local"><source src="http://example.com/images/0/00/Video.ogv" type="video/ogg; codecs="theora"" data-width="320" data-height="240" /></video></span></span> |
| 262 |
</p> |
| 263 |
!! html/parsoid |
| 264 |
<p><span class="mw-default-size" typeof="mw:File mw:ExpandedAttrs" about="#mwt1" data-mw='{"attribs":[["alt",{"html":"alt=testing <b data-parsoid='{\"dsr\":[29,39,3,3]}'>bold</b> in alt","txt":"testing bold in alt"}]]}'><span><video poster="http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg" controls="" preload="none" data-mw-tmh="" height="240" width="320" resource="./File:Video.ogv" data-durationhint="5" class="mw-file-element"><source src="http://example.com/images/0/00/Video.ogv" type='video/ogg; codecs="theora"' data-file-width="320" data-file-height="240"/></video></span></span></p> |
| 265 |
!! end |