You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<x:expectlabel="and there should be only one item that references each asset file"test="not(exists(//@href[(. = preceding::opf:item/@href) or (. = following::opf:item/@href)]))"/>
175
+
176
+
<x:scenariolabel="on audio/video elements with source children">
177
+
<x:call>
178
+
<x:paramname="asset-nodes">
179
+
<video>
180
+
<sourcesrc="dancing-puppy.mp4"/>
181
+
<sourcesrc="dancing-puppy.ogg"/>
182
+
</video>
183
+
<audio>
184
+
<sourcesrc="purring-kitty.aac"/>
185
+
<sourcesrc="purring-kitty.mp3"/>
186
+
</audio>
187
+
<!-- Intentional duplicate for testing to ensure no manifest redundancy -->
188
+
<video>
189
+
<sourcesrc="dancing-puppy.mp4"/>
190
+
</video>
191
+
</x:param>
192
+
</x:call>
193
+
<x:expectlabel="there should be an item for each audio/video src in the source files"
194
+
test="every $asset in ('dancing-puppy.mp4', 'dancing-puppy.ogg', 'purring-kitty.aac', 'purring-kitty.mp3')
195
+
satisfies (exists(//opf:item[@href=$asset]))"/>
196
+
<x:expectlabel="audio/video items should have the correct mimetype inferred"test="(every $asset in (//opf:item[substring-after(@href, '.') = 'mp4'])
197
+
satisfies ($asset[@media-type = 'video/mp4'])) and
198
+
(every $asset in (//opf:item[substring-after(@href, '.') = 'ogg'])
199
+
satisfies ($asset[@media-type = 'video/ogg'])) and
200
+
(every $asset in (//opf:item[substring-after(@href, '.') = 'aac'])
201
+
satisfies ($asset[@media-type = 'audio/mp4'])) and
202
+
(every $asset in (//opf:item[substring-after(@href, '.') = 'mp3'])
<x:expectlabel="and there should be only one item that references each asset file"test="not(exists(//@href[(. = preceding::opf:item/@href) or (. = following::opf:item/@href)]))"/>
205
+
</x:scenario>
206
+
207
+
<x:scenariolabel="on audio/video elements with @type attributes that don't match expected types that would be inferred from file extension">
208
+
<x:call>
209
+
<x:paramname="asset-nodes">
210
+
<video>
211
+
<sourcesrc="dancing-puppy.mp4"type="video/ogg"/>
212
+
</video>
213
+
<audio>
214
+
<sourcesrc="purring-kitty.mp3"type="audio/mp4"/>
215
+
</audio>
216
+
</x:param>
217
+
</x:call>
218
+
219
+
<x:expectlabel="@type attributes should take precedence in determining item @media-type">
0 commit comments