Skip to content

Commit

Permalink
Add another test for the bug fix from revision cf2aefb
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyba committed Mar 1, 2015
1 parent 56d88d7 commit 2d0eea9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions javascript/webdriver/test/promise_error_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,29 @@ function testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_withReturn() {
}


function testTasksWithinQueuedCallbackInAFrameAreDroppedIfFrameAborts() {
var seen = [];
return flow.execute(function() {
flow.execute(throwStubError);
webdriver.promise.fulfilled().then(function() {
seen.push(1);

return flow.execute(function() {
seen.push(2);
});

// This callback depends on the result of a cancelled task, so it will never
// be invoked.
}).thenFinally(function() {
seen.push(3);
});
}).then(fail, function(e) {
assertIsStubError(e);
assertArrayEquals([1], seen);
});
}


function testTaskIsCancelledAfterWaitTimeout() {
var seen = [];
return flow.execute(function() {
Expand Down

0 comments on commit 2d0eea9

Please sign in to comment.