Issue metadata
Sign in to add a comment
|
'Push' button disappeared from chrome://serviceworker-internals |
||||||||||||||||||||||
Issue descriptionI used the 'push' button on chrome://serviceworker-internals all the time, and know some developers use it with WebDriver to test their push notification implementations locally (crazy but awesome). Can we bring it back? Bonus marks if we add the ability to pass in arbitrary payload...
,
Mar 24 2016
We removed this from chrome://serviceworker-internals because there's better tooling in DevTools now: 1. Go to a page with a service worker like https://tests.peter.sh/notification-generator/ 2. Open DevTools > Resources > Service Workers 3. For one of the workers click the bell icon (Emulate push event) If that does not address the use case, please reopen.
,
Mar 25 2016
Is there a way to use that button without having the site open? The value of having this button on serviceworker-internals is that you can push even when there are no tabs for the site open.
,
Mar 31 2016
Nate makes a good point, not being able to press that button without the page open would be a significant regression. Is there a way of still achieving that without the push button on sw-internals?
,
Mar 31 2016
[bouncing back to unconfirmed until we resolve the issue Nate raised]
,
Mar 31 2016
This is somewhat of an aside, but, I think it's important that the chrome://serviceworker-internals page doesn't go away all together. There is a lot of value in being able to update and inspect service workers before a page is open and the service worker has gotten its first fetch event. If I want to inspect a service worker and change what's in it's cache before it get's a fetch request then there's no way to do that if chrome://serviceworker-internals goes away all together.
,
Apr 1 2016
I agree with the point in #3, but I'd like to approach this as a problem rather than linking it to the previous solution. (Which we should reconsider, at least for M50.) In an ideal world, whatever solution we come up with would be usable for automated testing as well as manual testing, i.e. using DevTools with its protocol. The three primitives we need would be (1) forcefully shut down Service Worker, (2) fake the SW's clients and (3) fake a push message. I believe we only offer (3) today. horo@, did you consider anything like this in your previous explorations?
,
Apr 4 2016
+CC:pfeldman@ I think "show all" checkbox in Service Workers view in DevTools will solve this problem. https://codereview.chromium.org/1853073003/
,
Apr 4 2016
,
Apr 4 2016
@horo: while the CL that you sent out seems to be a very pragmatic solution to the problem, it is still broken end-to-end in many ways. I could not get the https://tests.peter.sh/notification-generator/ sample to work with it, neither I could try out examples from the web (https://gauntface.com/blog/2014/12/15/push-notifications-service-worker). These seem to be all wrong and need improvement: - DevTools is for the page, I should not see unrelated SW there. We need to pull chrome://inspect into the DevTools to show multiple targets there, so I'd rather we had push-to-wake service worker in chrome://inspect first - Once I open DevTools for the SW itself, I don't have the Resources / SW and hence can not emit notification events - There is no way to visually observe the notification and action upon it. - There is no way to control notification-related data
,
Apr 5 2016
,
Apr 6 2016
> @horo: while the CL that you sent out seems to be a very pragmatic solution to the problem, it is still broken end-to-end in many ways. I could not get the https://tests.peter.sh/notification-generator/ sample to work with it, neither I could try out examples from the web (https://gauntface.com/blog/2014/12/15/push-notifications-service-worker). https://tests.peter.sh/notification-generator/ is not using "Push" notification now. It is using serviceWorker.showNotification(). So the push button doesn't do anything in this site. You can try the button on Facebook or https://locchat.com if you have accepted the permission. > These seem to be all wrong and need improvement: > > - DevTools is for the page, I should not see unrelated SW there. We need to pull chrome://inspect into the DevTools to show multiple targets there, so I'd rather we had push-to-wake service worker in chrome://inspect first chrome://inspect shows only running Service Workers. Do you think it should show all stopped Service Workers? Or are you saying about chrome://serviceworker-internals? > - Once I open DevTools for the SW itself, I don't have the Resources / SW and hence can not emit notification events Yes, it is a bug. Filed Issue 600901 . > - There is no way to visually observe the notification and action upon it. You can set a breakpoint in the push event handler in SW. > - There is no way to control notification-related data Yes, it is a bug. Filed Issue 600902 .
,
Apr 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f17e936b00b806271cde194bb570e4b3790846a commit 1f17e936b00b806271cde194bb570e4b3790846a Author: horo <horo@chromium.org> Date: Wed Apr 06 03:07:17 2016 [DevTools] Add "Show all" check box in Service Worker view. There are some requests from web developers to provide a way to debug SWs before opening the page. This cl adds "Show all" check box which shows all SWs in DevTools. BUG= 597538 Review URL: https://codereview.chromium.org/1853073003 Cr-Commit-Position: refs/heads/master@{#385372} [modify] https://crrev.com/1f17e936b00b806271cde194bb570e4b3790846a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js [modify] https://crrev.com/1f17e936b00b806271cde194bb570e4b3790846a/third_party/WebKit/Source/devtools/front_end/resources/serviceWorkersView.css
,
Apr 6 2016
My comment #10 was by no means critics. I am rather offering my own help in resolving these - we seem to have a lot to add and fix in our SW support.
,
Apr 28 2016
Now we have "Show all" checkbox in DevTools SWView. So we can click "push" without opening the site. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by miguelg@chromium.org
, Mar 24 2016