From 8bffb99c6e19ca6f968490d8977518e61fc38ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Thu, 23 Mar 2023 16:58:57 +0100 Subject: [PATCH] fix: Fix missing originalUri in response filters (#5114) --- externs/shaka/net.js | 1 + test/media/streaming_engine_unit.js | 7 ++++++- test/net/networking_engine_unit.js | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/externs/shaka/net.js b/externs/shaka/net.js index 2851f76a54..34a26b6afd 100644 --- a/externs/shaka/net.js +++ b/externs/shaka/net.js @@ -112,6 +112,7 @@ shaka.extern.Request; /** * @typedef {{ * uri: string, + * originalUri: string, * data: BufferSource, * status: (number|undefined), * headers: !Object., diff --git a/test/media/streaming_engine_unit.js b/test/media/streaming_engine_unit.js index ab91da5dbb..97d06035d3 100644 --- a/test/media/streaming_engine_unit.js +++ b/test/media/streaming_engine_unit.js @@ -3429,7 +3429,12 @@ describe('StreamingEngine', () => { netEngine.request.and.callFake((requestType, request, context) => { const buffer = new ArrayBuffer(0); /** @type {shaka.extern.Response} */ - const response = {uri: request.uris[0], data: buffer, headers: {}}; + const response = { + uri: request.uris[0], + originalUri: request.uris[0], + data: buffer, + headers: {}, + }; return shaka.util.AbortableOperation.completed(response); }); diff --git a/test/net/networking_engine_unit.js b/test/net/networking_engine_unit.js index 3fe96ad03f..4ab5094ed2 100644 --- a/test/net/networking_engine_unit.js +++ b/test/net/networking_engine_unit.js @@ -1226,6 +1226,11 @@ describe('NetworkingEngine', /** @suppress {accessControls} */ () => { /** @return {shaka.extern.Response} */ function createResponse() { - return {uri: '', data: new ArrayBuffer(5), headers: {}}; + return { + uri: '', + originalUri: '', + data: new ArrayBuffer(5), + headers: {}, + }; } }); // describe('NetworkingEngine')