Skip to content

Commit 2d0eea9

Browse files
committed
Add another test for the bug fix from revision cf2aefb
1 parent 56d88d7 commit 2d0eea9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

javascript/webdriver/test/promise_error_test.js

+23
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,29 @@ function testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_withReturn() {
635635
}
636636

637637

638+
function testTasksWithinQueuedCallbackInAFrameAreDroppedIfFrameAborts() {
639+
var seen = [];
640+
return flow.execute(function() {
641+
flow.execute(throwStubError);
642+
webdriver.promise.fulfilled().then(function() {
643+
seen.push(1);
644+
645+
return flow.execute(function() {
646+
seen.push(2);
647+
});
648+
649+
// This callback depends on the result of a cancelled task, so it will never
650+
// be invoked.
651+
}).thenFinally(function() {
652+
seen.push(3);
653+
});
654+
}).then(fail, function(e) {
655+
assertIsStubError(e);
656+
assertArrayEquals([1], seen);
657+
});
658+
}
659+
660+
638661
function testTaskIsCancelledAfterWaitTimeout() {
639662
var seen = [];
640663
return flow.execute(function() {

0 commit comments

Comments
 (0)