Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a mock way to test upgrade extensions from the extension store #382

Closed
hanguokai opened this issue Apr 20, 2023 · 6 comments
Closed
Labels
enhancement Enhancement or change to an existing feature follow-up: safari Needs a response from a Safari representative topic: testing Related to validating behavior of an extension.

Comments

@hanguokai
Copy link
Member

This is a feature request for debugging and testing purpose. Because extensions stores have many policy requirements and review process, it is almost impossible for developers to actually test this particular process of upgrading an extension from the extension store.

Some usage scenarios:

  • test runtime.onInstalled event
  • test if an extension will be disabled for permissions change. and test the subsequent process.
  • Sometimes developers don't encounter problems in developing mode locally, but occasionally they find problems during the upgrade process. This situation requires trying to reproduce the problem, which requires do upgrade many times, but only for debugging purposes.

Note: current "reload" and "enable/disable" buttons cannot 100% simulate the code path of the upgrade process from the extension store.

@hanguokai
Copy link
Member Author

For Chrome, I find a easy way to simulate the upgrade process locally in unpacked mode: drag the same folder to chrome://extensions . It's similar to clicking the reload button, but it even works when the extension is disabled. I'm not sure this method is exactly the same as upgrading from the extension store, e.g. it doesn't trigger new warning permission behavior (disable the extension and prompt granting new permission).

@dotproto dotproto added enhancement Enhancement or change to an existing feature topic: testing Related to validating behavior of an extension. and removed needs-triage labels Apr 27, 2023
@dotproto
Copy link
Member

To build on this comment, developers don't have a single way to test the upgrade flow for an extension. Instead, they must use two very similar flows to test different aspects of the installation:

  1. Upgrading an unpacked extension to test extension functionality
  2. Upgrading a self-signed extension to test permission upgrades

At the moment, it's only possible to test the upgraded process in a single flow by doing the self-signed upgrade test on Linux.

IMO it should be possible to test the upgrade flow using an automated process. This includes checking if the extension is disabled for permission upgrades and, if so, retrieving the text and/or a screenshot of the the prompt presented to the end user.

@Rob--W
Copy link
Member

Rob--W commented Apr 27, 2023

@dotproto
Copy link
Member

@xeenon, could you follow up with info on how to test upgrades in Safari?

@dotproto dotproto added the follow-up: safari Needs a response from a Safari representative label Apr 27, 2023
@xeenon
Copy link
Collaborator

xeenon commented Apr 27, 2023

Safari 16.4 has a similar alert that disables the extension on permission expansion. This flow also happens when building and running from Xcode during development.

@patrickkettner
Copy link
Contributor

While this is an important concept in testing, it is fully dependent on browser UI and stores, so the WECG determined it is out of scope for the WECG.

Chrome has the extension-update-testing-tool,
Firefox has their docs, and Safari is investigating making this easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or change to an existing feature follow-up: safari Needs a response from a Safari representative topic: testing Related to validating behavior of an extension.
Projects
None yet
Development

No branches or pull requests

5 participants