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

[dotnet] support installing temporary addon in Firefox #10093

Closed

Conversation

titusfortner
Copy link
Member

This fixes #10084

Jim, I think this is correct, but let me know if I missed something. Thanks

@sonarcloud
Copy link

sonarcloud bot commented Nov 27, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Comment on lines 291 to +293
byte[] addOnBytes = File.ReadAllBytes(addOnFileToInstall);
string base64AddOn = Convert.ToBase64String(addOnBytes);
this.InstallAddOn(base64AddOn);
this.InstallAddOn(base64AddOn, temporary);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In reading #8357 (comment) it sounds like geckodriver supports local "unpacked" extensions (if the temporary flag is set) and in that case we'd need to use the "path" parametered api in that case. Ideally we'd check to see if the path is a directory and if so, use that api, otherwise base64 up the file like we are doing now and use the AddOn api.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API will be a method that takes a path, and a method that takes a path and a temporary value. The implementation of it doesn't matter to the end user.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you that it will all work fine so long as path is the path to a .xpi or .zip but not when it is the path to an unpacked extension directory, which it would also be nice to support.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll do everything with addon keyword instead of path, so it will work the way you need. It should already work properly with .NET in 4.1, just without the temporary toggle.

@titusfortner
Copy link
Member Author

merged this instead 1b20938

@titusfortner titusfortner deleted the dotnet_temp_addon branch December 4, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🚀 Feature]: Java/CS FirefoxProfile to support addExtensioin temporary
2 participants