From 71f6737a883c326c6f403fb3b7afed22e91263a3 Mon Sep 17 00:00:00 2001 From: Jeremie COLLET Date: Tue, 11 Jul 2017 10:04:19 +0200 Subject: [PATCH] Fix a problem on XLinkController unit tests, due to merge with PR #2054 (Dash Parser unit tests) --- test/unit/streaming.controllers.XLinkController.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/unit/streaming.controllers.XLinkController.js b/test/unit/streaming.controllers.XLinkController.js index df380eb983..377b99da23 100644 --- a/test/unit/streaming.controllers.XLinkController.js +++ b/test/unit/streaming.controllers.XLinkController.js @@ -12,14 +12,25 @@ const expect = chai.expect; const context = {}; const eventBus = EventBus(context).getInstance(); +function ErrorHandlerMock() { + this.error = undefined; + + this.manifestError = function(error) { + this.error = error; + }; +} + describe('XLinkController', function () { let xLinkController; + let errorHandlerMock = new ErrorHandlerMock(); function parseManifest(url, xml, xlinkController) { let urlUtils = URLUtils(context).getInstance(); let baseUri = urlUtils.parseBaseUrl(url); - let parser = DashParser(context).create({}); + let parser = DashParser(context).create({ + errorHandler: errorHandlerMock + }); const manifest = parser.parse(xml, xlinkController); if (manifest) {