@@ -659,15 +659,16 @@ describe('integration', function () {
659
659
function ( ) {
660
660
// some browsers trigger onpopstate for load / reset breadcrumb state
661
661
Raven . _breadcrumbs = [ ] ;
662
+
662
663
history . pushState ( { } , '' , '/foo' ) ;
663
- history . pushState ( { } , '' , '/bar' ) ;
664
+ history . pushState ( { } , '' , '/bar?a=1#fragment ' ) ;
664
665
history . pushState ( { } , '' , { } ) ; // pushState calls toString on non-string args
665
666
history . pushState ( { } , '' , null ) ; // does nothing / no-op
666
667
667
668
// can't call history.back() because it will change url of parent document
668
669
// (e.g. document running mocha) ... instead just "emulate" a back button
669
670
// press by calling replaceState + onpopstate manually
670
- history . replaceState ( { } , '' , '/bar' ) ;
671
+ history . replaceState ( { } , '' , '/bar?a=1#fragment ' ) ;
671
672
window . onpopstate ( ) ;
672
673
done ( ) ;
673
674
} ,
@@ -679,22 +680,22 @@ describe('integration', function () {
679
680
680
681
assert . equal ( breadcrumbs . length , 4 ) ;
681
682
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)
685
686
686
687
// assert end of string because PhantomJS uses full system path
687
688
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' ) ;
688
689
assert . ok ( / \/ f o o $ / . test ( breadcrumbs [ 0 ] . data . to ) , '\'to\' url is incorrect' ) ;
689
690
690
691
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' ) ;
692
693
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' ) ;
694
695
assert . ok ( / \[ o b j e c t O b j e c t \] $ / . test ( breadcrumbs [ 2 ] . data . to ) , '\'to\' url is incorrect' ) ;
695
696
696
697
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' ) ;
698
699
}
699
700
) ;
700
701
} ) ;
0 commit comments