From 3ce4f11c4ba57128c2e02a827f801678493f5f5e Mon Sep 17 00:00:00 2001 From: Johannes Schmid Date: Thu, 24 Nov 2016 11:24:25 +0100 Subject: [PATCH] IRT workshop automation fixes --- appmanager/bcindepapp.php | 13 +++++++++++ base.js | 7 ++++++ channels/index.php | 14 ++++++++++++ dolby/detail.php | 14 +++++++++++- report.php | 46 +++++++++++++++++++++++++++++++++------ videocontrol/index.php | 35 ++++++++++++++++++++--------- videoscale/index.php | 24 +++++++++++++++++++- 7 files changed, 134 insertions(+), 19 deletions(-) diff --git a/appmanager/bcindepapp.php b/appmanager/bcindepapp.php index d7b57a9..8d9303d 100644 --- a/appmanager/bcindepapp.php +++ b/appmanager/bcindepapp.php @@ -53,19 +53,32 @@ function runStep(name) { showStatus(false, 'Returning back to original channel failed.'); } } else if (name=='bcvideo') { + var timout = null; vid.onChannelChangeSucceeded = function() { vid.onChannelChangeSucceeded = null; vid.onChannelChangeError = null; showStatus(false, 'No SecurityException received. Application had access to video/broadcast, but no access should have been granted (broadcast-independant app).'); + if (timout) { + clearTimeout(timout); + } }; vid.onChannelChangeError = function() { vid.onChannelChangeSucceeded = null; vid.onChannelChangeError = null; showStatus(false, 'No SecurityException received, but at least access to video/broadcast was denied via onChannelChangeError (broadcast-independant app).'); + if (timout) { + clearTimeout(timout); + } }; try { vid.bindToCurrentChannel(); setInstr('Did not get the expected SecurityException (see A.2.4.2 in HbbTV spec), waiting for channel change event...'); + timout = setTimeout(function() { + timout = null; + vid.onChannelChangeSucceeded = null; + vid.onChannelChangeError = null; + showStatus(false, 'No SecurityException received and did not receive any channel change event, too.'); + }, 10000); } catch (e) { vid.onChannelChangeSucceeded = null; vid.onChannelChangeError = null; diff --git a/base.js b/base.js index ad8b065..891e265 100644 --- a/base.js +++ b/base.js @@ -267,5 +267,12 @@ function stopAutomation() { if (automate.timer) { clearTimeout(automate.timer); } + try { + i = document.getElementById('bgdiv'); + if (i) { + i.style.backgroundColor = '#132d48'; + } + } catch (ignore) { + } } diff --git a/channels/index.php b/channels/index.php index f4520b4..a472a59 100644 --- a/channels/index.php +++ b/channels/index.php @@ -8,6 +8,7 @@