-
Notifications
You must be signed in to change notification settings - Fork 327
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
Include query string in MatchPattern URL test #2732
Include query string in MatchPattern URL test #2732
Conversation
Please include a unit test. |
Added unit test. Without fix:
With fix:
|
test/bg/user-script-registry.test.js
Outdated
@@ -31,4 +31,27 @@ describe('bg/user-script-registry', () => { | |||
}); | |||
}); | |||
}); | |||
|
|||
it('match pattern respects query string', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of it('match pattern ...
, this should be a test of MatchPattern.doMatch() directly. That's the code you're changing. And it would also need less setup code, tested that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I add a test/third-party
directory and MatchPattern.test.js
file then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Added |
Great! Thanks for all the updates! |
Super simple fix prescribed by @arantius, fixes #2715.
Tested with this branch loaded as a temporary webext in FF 57 and it does indeed fix the issue (obviously).