3

I am building a push notification system for Chrome and understand that I should include the event handler "pushsubscriptionchange" so I can resubscribe the user. This makes sense as my users have opted in to be notified of other users activity and we wouldn't want that notification broken.

My question: how can test this?

What process can I do that would allow this event to be fired and for me to monitor it for errors?

Wairowe
  • 205
  • 2
  • 6
  • 2
    In Firefox, you can remove the subscription from about:preferences#content. This will make the event fire. Try the equivalent in Chrome. – Marco Castelluccio Feb 26 '16 at 09:14
  • 1
    Instead, to simulate the subscription expiration, in Firefox you can reset the `dom.push.userAgentID` preference. – Marco Castelluccio Feb 26 '16 at 09:36
  • 1
    Possible duplicate of [How can I test pushsubscriptionchange event-handling code?](http://stackoverflow.com/questions/36602136/how-can-i-test-pushsubscriptionchange-event-handling-code) – Marco Castelluccio Apr 13 '16 at 17:51

0 Answers0