@@ -196,8 +196,10 @@ describe('MediaCapabilities', () => {
196
196
await navigator . mediaCapabilities . decodingInfo ( mockDecodingConfig ) ;
197
197
198
198
expect ( mockCanDisplayType ) . not . toHaveBeenCalled ( ) ;
199
- // 1 (during install()) + 1 (for video config check).
200
- expect ( isChromecastSpy ) . toHaveBeenCalledTimes ( 2 ) ;
199
+ // 1 (during install()) +
200
+ // 1 (for video config check) +
201
+ // 1 (for audio config check).
202
+ expect ( isChromecastSpy ) . toHaveBeenCalledTimes ( 3 ) ;
201
203
// 1 (fallback in canCastDisplayType()) +
202
204
// 1 (mockDecodingConfig.audio).
203
205
expect ( supportMap . has ( mockDecodingConfig . video . contentType ) )
@@ -219,8 +221,10 @@ describe('MediaCapabilities', () => {
219
221
await navigator . mediaCapabilities . decodingInfo ( mockDecodingConfig ) ;
220
222
221
223
expect ( mockCanDisplayType ) . not . toHaveBeenCalled ( ) ;
222
- // 1 (during install()) + 1 (for video config check).
223
- expect ( isChromecastSpy ) . toHaveBeenCalledTimes ( 2 ) ;
224
+ // 1 (during install()) +
225
+ // 1 (for video config check) +
226
+ // 1 (for audio config check).
227
+ expect ( isChromecastSpy ) . toHaveBeenCalledTimes ( 3 ) ;
224
228
// 1 (fallback in canCastDisplayType()) +
225
229
// 1 (mockDecodingConfig.audio).
226
230
expect ( supportMap . has ( mockDecodingConfig . video . contentType ) )
@@ -266,8 +270,10 @@ describe('MediaCapabilities', () => {
266
270
shaka . polyfill . MediaCapabilities . install ( ) ;
267
271
await navigator . mediaCapabilities . decodingInfo ( mockDecodingConfig ) ;
268
272
269
- // 1 (during install()) + 1 (for video config check).
270
- expect ( isChromecastSpy ) . toHaveBeenCalledTimes ( 2 ) ;
273
+ // 1 (during install()) +
274
+ // 1 (for video config check) +
275
+ // 1 (for audio config check).
276
+ expect ( isChromecastSpy ) . toHaveBeenCalledTimes ( 3 ) ;
271
277
// 1 (mockDecodingConfig.audio).
272
278
expect ( supportMap . has ( chromecastType ) ) . toBe ( true ) ;
273
279
// Called once in canCastDisplayType.
0 commit comments