Skip to content

Commit

Permalink
[Presentation API] Re-enable timeout after user interaction (#4319)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
obstschale authored and tidoust committed Dec 13, 2016
1 parent 98f9060 commit 2a36110
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ <h2>Description</h2>
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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ <h2>Description</h2>
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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ <h2>Description</h2>
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");
Expand Down

0 comments on commit 2a36110

Please sign in to comment.