@@ -659,15 +659,16 @@ describe('integration', function () {
659659 function ( ) {
660660 // some browsers trigger onpopstate for load / reset breadcrumb state
661661 Raven . _breadcrumbs = [ ] ;
662+
662663 history . pushState ( { } , '' , '/foo' ) ;
663- history . pushState ( { } , '' , '/bar' ) ;
664+ history . pushState ( { } , '' , '/bar?a=1#fragment ' ) ;
664665 history . pushState ( { } , '' , { } ) ; // pushState calls toString on non-string args
665666 history . pushState ( { } , '' , null ) ; // does nothing / no-op
666667
667668 // can't call history.back() because it will change url of parent document
668669 // (e.g. document running mocha) ... instead just "emulate" a back button
669670 // press by calling replaceState + onpopstate manually
670- history . replaceState ( { } , '' , '/bar' ) ;
671+ history . replaceState ( { } , '' , '/bar?a=1#fragment ' ) ;
671672 window . onpopstate ( ) ;
672673 done ( ) ;
673674 } ,
@@ -679,22 +680,22 @@ describe('integration', function () {
679680
680681 assert . equal ( breadcrumbs . length , 4 ) ;
681682 assert . equal ( breadcrumbs [ 0 ] . category , 'navigation' ) ; // (start) => foo
682- assert . equal ( breadcrumbs [ 1 ] . category , 'navigation' ) ; // foo => bar
683- assert . equal ( breadcrumbs [ 2 ] . category , 'navigation' ) ; // bar => [object%20Object]
684- assert . equal ( breadcrumbs [ 3 ] . category , 'navigation' ) ; // [object%20Object] => bar(back button)
683+ assert . equal ( breadcrumbs [ 1 ] . category , 'navigation' ) ; // foo => bar?a=1#fragment
684+ assert . equal ( breadcrumbs [ 2 ] . category , 'navigation' ) ; // bar?a=1#fragment => [object%20Object]
685+ assert . equal ( breadcrumbs [ 3 ] . category , 'navigation' ) ; // [object%20Object] => bar?a=1#fragment (back button)
685686
686687 // assert end of string because PhantomJS uses full system path
687688 assert . ok ( / \/ t e s t \/ i n t e g r a t i o n \/ f r a m e \. h t m l $ / . test ( Raven . _breadcrumbs [ 0 ] . data . from ) , '\'from\' url is incorrect' ) ;
688689 assert . ok ( / \/ f o o $ / . test ( breadcrumbs [ 0 ] . data . to ) , '\'to\' url is incorrect' ) ;
689690
690691 assert . ok ( / \/ f o o $ / . test ( breadcrumbs [ 1 ] . data . from ) , '\'from\' url is incorrect' ) ;
691- assert . ok ( / \/ b a r $ / . test ( breadcrumbs [ 1 ] . data . to ) , '\'to\' url is incorrect' ) ;
692+ assert . ok ( / \/ b a r \? a = 1 # f r a g m e n t $ / . test ( breadcrumbs [ 1 ] . data . to ) , '\'to\' url is incorrect' ) ;
692693
693- assert . ok ( / \/ b a r $ / . test ( breadcrumbs [ 2 ] . data . from ) , '\'from\' url is incorrect' ) ;
694+ assert . ok ( / \/ b a r \? a = 1 # f r a g m e n t $ / . test ( breadcrumbs [ 2 ] . data . from ) , '\'from\' url is incorrect' ) ;
694695 assert . ok ( / \[ o b j e c t O b j e c t \] $ / . test ( breadcrumbs [ 2 ] . data . to ) , '\'to\' url is incorrect' ) ;
695696
696697 assert . ok ( / \[ o b j e c t O b j e c t \] $ / . test ( breadcrumbs [ 3 ] . data . from ) , '\'from\' url is incorrect' ) ;
697- assert . ok ( / \/ b a r / . test ( breadcrumbs [ 3 ] . data . to ) , '\'to\' url is incorrect' ) ;
698+ assert . ok ( / \/ b a r \? a = 1 # f r a g m e n t / . test ( breadcrumbs [ 3 ] . data . to ) , '\'to\' url is incorrect' ) ;
698699 }
699700 ) ;
700701 } ) ;
0 commit comments