File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -796,6 +796,7 @@ if ($.support.pjax) {
796
796
} )
797
797
} )
798
798
799
+ // Test is fragile
799
800
asyncTest ( "no initial pjax:popstate event" , function ( ) {
800
801
var frame = this . frame
801
802
var count = 0 ;
@@ -812,12 +813,15 @@ if ($.support.pjax) {
812
813
} else if ( count == 3 ) {
813
814
equal ( frame . location . pathname , "/env.html" )
814
815
frame . history . back ( )
816
+ setTimeout ( function ( ) { window . iframeLoad ( frame ) } , 1000 )
815
817
} else if ( count == 4 ) {
816
818
equal ( frame . location . pathname , "/hello.html" )
817
819
frame . history . back ( )
820
+ setTimeout ( function ( ) { window . iframeLoad ( frame ) } , 1000 )
818
821
} else if ( count == 5 ) {
819
822
equal ( frame . location . pathname , "/home.html" )
820
823
frame . history . forward ( )
824
+ setTimeout ( function ( ) { window . iframeLoad ( frame ) } , 1000 )
821
825
} else if ( count == 6 ) {
822
826
// Should skip pjax:popstate since theres no initial pjax.state
823
827
frame . $ ( '#main' ) . on ( 'pjax:popstate' , function ( event ) {
@@ -834,8 +838,9 @@ if ($.support.pjax) {
834
838
if ( count == 6 ) {
835
839
count ++
836
840
frame . history . forward ( )
841
+ setTimeout ( function ( ) { window . iframeLoad ( frame ) } , 1000 )
837
842
} else {
838
- start ( )
843
+ setTimeout ( function ( ) { start ( ) } , 1000 )
839
844
}
840
845
} )
841
846
}
You can’t perform that action at this time.
0 commit comments