From 2a361102974320448daf4022b578ebef0a590418 Mon Sep 17 00:00:00 2001 From: Hans-Helge Buerger Date: Tue, 13 Dec 2016 17:42:42 +0100 Subject: [PATCH] [Presentation API] Re-enable timeout after user interaction (#4319) This commit re-enables the test harness' timeout in `PresentationConnection_onxxx` tests once user interaction is over. * Update timeout and use `force_timeout`. Also increase timeout to 5 sec --- .../PresentationConnection_onclosed-manual.html | 7 +++++++ .../PresentationConnection_onconnected-manual.html | 7 +++++++ .../PresentationConnection_onterminated-manual.html | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/presentation-api/controlling-ua/PresentationConnection_onclosed-manual.html b/presentation-api/controlling-ua/PresentationConnection_onclosed-manual.html index f6d912bcbc97ac..a4aa65e9adccdc 100644 --- a/presentation-api/controlling-ua/PresentationConnection_onclosed-manual.html +++ b/presentation-api/controlling-ua/PresentationConnection_onclosed-manual.html @@ -26,6 +26,13 @@

Description

var request = new PresentationRequest(presentationUrls); request.start() .then(function(connection) { + + // Enable timeout again, cause no user action is needed from here. + t.step_timeout(function() { + t.force_timeout(); + t.done(); + }, 5000); + assert_true(connection instanceof PresentationConnection, 'the connection is setup'); connection.onclose = t.step_func_done(function(evt) { assert_equals(evt.type, "close"); diff --git a/presentation-api/controlling-ua/PresentationConnection_onconnected-manual.html b/presentation-api/controlling-ua/PresentationConnection_onconnected-manual.html index 7546db92976a54..3c75b969e0ec51 100644 --- a/presentation-api/controlling-ua/PresentationConnection_onconnected-manual.html +++ b/presentation-api/controlling-ua/PresentationConnection_onconnected-manual.html @@ -25,6 +25,13 @@

Description

var request = new PresentationRequest(presentationUrls); request.start() .then(function(connection) { + + // Enable timeout again, cause no user action is needed from here. + t.step_timeout(function() { + t.force_timeout(); + t.done(); + }, 5000); + assert_true(connection instanceof PresentationConnection); connection.onconnect = t.step_func_done(function() { assert_equals(connection.state, "connected"); diff --git a/presentation-api/controlling-ua/PresentationConnection_onterminated-manual.html b/presentation-api/controlling-ua/PresentationConnection_onterminated-manual.html index 88fb926b8a8ad8..68ee6280a8519f 100644 --- a/presentation-api/controlling-ua/PresentationConnection_onterminated-manual.html +++ b/presentation-api/controlling-ua/PresentationConnection_onterminated-manual.html @@ -26,6 +26,13 @@

Description

var request = new PresentationRequest(presentationUrls); request.start() .then(function(connection) { + + // Enable timeout again, cause no user action is needed from here. + t.step_timeout(function() { + t.force_timeout(); + t.done(); + }, 5000); + assert_true(connection instanceof PresentationConnection); connection.onconnect = t.step_func(function(evt) { assert_equals(connection.state, "connected");