Commit dc97e7b
Media Capabilities: Add robust WPT for encryptionScheme plumbing
Previously, WPT tests for mediaCapabilities.decodingInfo()
encryptionScheme plumbing succeeded even if the plumbing was
missing or incomplete. This was because the tests only validated
that the returned object has supported/smooth/powerEfficient as
booleans using the standard Clear Key system (which supports both
cenc and cbcs).
To make these tests fail when the plumbing is missing or broken:
1. Define a helper function in WPT that queries decodingInfo() with a
specific encryptionScheme, and asserts that the negotiated
configuration matches the expected scheme and support status.
2. Run test cases covering different valid encryption schemes ('cenc',
'cbcs', 'cbcs-1-9'), as well as unrecognized ('foobar') and null
schemes. If the plumbing is missing, unrecognized schemes will be
incorrectly supported, and valid schemes will negotiate as null
instead of their expected scheme, causing the tests to fail.
3. Remove the obsolete and non-assertive tests that only checked
that the result type was a boolean.
Bug: 498284510
Change-Id: I88b3c01f7b3f200312b948f18714707ca2aa7c32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8076778
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Sangbaek Park <sangbaekpark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1662185}1 parent e69af49 commit dc97e7b
1 file changed
Lines changed: 43 additions & 25 deletions
Lines changed: 43 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
| 277 | + | |
277 | 278 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
298 | 319 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | 320 | | |
303 | 321 | | |
0 commit comments