@@ -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,34 @@ 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+ iframeExecute ( iframe , done ,
377+ function ( ) {
378+ // some browsers trigger onpopstate for load / reset breadcrumb state
379+ Raven . _breadcrumbs = [ ] ;
380+
381+ var xhr = new XMLHttpRequest ( ) ;
382+ xhr . open ( 'GET' , 'https://example.com/api/1/store/?sentry_key=public' ) ;
383+ xhr . setRequestHeader ( 'Content-type' , 'application/json' ) ;
384+ xhr . onreadystatechange = function ( ) {
385+ // don't fire `done` handler until at least *one* onreadystatechange
386+ // has occurred (doesn't actually need to finish)
387+ if ( xhr . readyState === 4 ) {
388+ setTimeout ( done ) ;
389+ }
390+ } ;
391+ xhr . send ( ) ;
392+ } ,
393+ function ( ) {
394+ var Raven = iframe . contentWindow . Raven ,
395+ breadcrumbs = Raven . _breadcrumbs ;
396+
397+ assert . equal ( breadcrumbs . length , 0 ) ;
398+ }
399+ ) ;
400+ } ) ;
401+
375402 it ( 'should record a mouse click on element WITH click handler present' , function ( done ) {
376403 var iframe = this . iframe ;
377404
0 commit comments