@@ -735,6 +735,39 @@ describe('integration', function () {
735
735
) ;
736
736
} ) ;
737
737
738
+ it ( 'should record consecutive keypress events in a contenteditable into a single "input" breadcrumb' , function ( done ) {
739
+ var iframe = this . iframe ;
740
+
741
+ iframeExecute ( iframe , done ,
742
+ function ( ) {
743
+ setTimeout ( done ) ;
744
+
745
+ // some browsers trigger onpopstate for load / reset breadcrumb state
746
+ Raven . _breadcrumbs = [ ] ;
747
+
748
+ // keypress <input/> twice
749
+ var keypress1 = document . createEvent ( 'KeyboardEvent' ) ;
750
+ keypress1 . initKeyboardEvent ( "keypress" , true , true , window , "b" , 66 , 0 , "" , false ) ;
751
+
752
+ var keypress2 = document . createEvent ( 'KeyboardEvent' ) ;
753
+ keypress2 . initKeyboardEvent ( "keypress" , true , true , window , "a" , 65 , 0 , "" , false ) ;
754
+
755
+ var div = document . querySelector ( '[contenteditable]' ) ;
756
+ div . dispatchEvent ( keypress1 ) ;
757
+ div . dispatchEvent ( keypress2 ) ;
758
+ } ,
759
+ function ( ) {
760
+ var Raven = iframe . contentWindow . Raven ,
761
+ breadcrumbs = Raven . _breadcrumbs ;
762
+
763
+ assert . equal ( breadcrumbs . length , 1 ) ;
764
+
765
+ assert . equal ( breadcrumbs [ 0 ] . category , 'ui.input' ) ;
766
+ assert . equal ( breadcrumbs [ 0 ] . message , 'body > form#foo-form > div.contenteditable' ) ;
767
+ }
768
+ ) ;
769
+ } ) ;
770
+
738
771
it ( 'should record history.[pushState|back] changes as navigation breadcrumbs' , function ( done ) {
739
772
var iframe = this . iframe ;
740
773
0 commit comments