@@ -306,7 +306,6 @@ describe('integration', function () {
306306
307307 iframeExecute ( iframe , done ,
308308 function ( ) {
309-
310309 // some browsers trigger onpopstate for load / reset breadcrumb state
311310 Raven . _breadcrumbs = [ ] ;
312311
@@ -372,6 +371,35 @@ describe('integration', function () {
372371 ) ;
373372 } ) ;
374373
374+ it ( 'should NOT capture breadcrumbs from XMLHttpRequests to the Sentry store endpoint' , function ( done ) {
375+ var iframe = this . iframe ;
376+ debugger ;
377+ iframeExecute ( iframe , done ,
378+ function ( ) {
379+ // some browsers trigger onpopstate for load / reset breadcrumb state
380+ Raven . _breadcrumbs = [ ] ;
381+
382+ var xhr = new XMLHttpRequest ( ) ;
383+ xhr . open ( 'GET' , 'https://example.com/api/1/store/' ) ;
384+ xhr . setRequestHeader ( 'Content-type' , 'application/json' ) ;
385+ xhr . onreadystatechange = function ( ) {
386+ // don't fire `done` handler until at least *one* onreadystatechange
387+ // has occurred (doesn't actually need to finish)
388+ if ( xhr . readyState === 4 ) {
389+ setTimeout ( done ) ;
390+ }
391+ } ;
392+ xhr . send ( ) ;
393+ } ,
394+ function ( ) {
395+ var Raven = iframe . contentWindow . Raven ,
396+ breadcrumbs = Raven . _breadcrumbs ;
397+
398+ assert . equal ( breadcrumbs . length , 0 ) ;
399+ }
400+ ) ;
401+ } ) ;
402+
375403 it ( 'should record a mouse click on element WITH click handler present' , function ( done ) {
376404 var iframe = this . iframe ;
377405
0 commit comments