File tree 1 file changed +23
-0
lines changed
javascript/webdriver/test
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -635,6 +635,29 @@ function testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_withReturn() {
635
635
}
636
636
637
637
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
+
638
661
function testTaskIsCancelledAfterWaitTimeout ( ) {
639
662
var seen = [ ] ;
640
663
return flow . execute ( function ( ) {
You can’t perform that action at this time.
0 commit comments