Closed Bug 1319107 Opened 3 years ago Closed 3 years ago

identity.getRedirectURL doesn't handle empty param correctly

Categories

(WebExtensions :: General, defect, P1)

49 Branch
defect

Tracking

(firefox53 verified)

VERIFIED FIXED
mozilla53
Tracking Status
firefox53 --- verified

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

(Whiteboard: triaged)

Attachments

(1 file)

From bug 1305421 comment 41

When you call getRedirectURL with no parameter, the method adds null : "https://a5917d103ab137a38a3e67f6c3c5435961044755.extensions.allizom.org/null"
In Chrome, there is no suffix : "https://jjllokfabehlkafdlglkjeafncpbhahg.chromiumapp.org/"
We need to define the default value in the schema rather than in the function arguments.
Whiteboard: triaged
Comment on attachment 8812968 [details]
Bug 1319107 fix default value for getRedirectURL,

https://reviewboard.mozilla.org/r/94496/#review94788

::: toolkit/components/extensions/test/mochitest/test_chrome_ext_identity.html:51
(Diff revision 1)
> +      await browser.test.assertEq(redirect_base, browser.identity.getRedirectURL(),
> +                                       "redirect url ok");
> +      await browser.test.assertEq(redirect_base, browser.identity.getRedirectURL(""),
> +                                       "redirect url ok");
> +      await browser.test.assertEq(redirect_base + "foobar", browser.identity.getRedirectURL("foobar"),
> +                                       "redirect url ok");
> +      await browser.test.assertEq(redirect_base + "callback", browser.identity.getRedirectURL("/callback"),
> +                                       "redirect url ok");

Weird indentation.
Attachment #8812968 - Flags: review?(kmaglione+bmo) → review+
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b327c38531cc
fix default value for getRedirectURL, r=kmag
https://hg.mozilla.org/mozilla-central/rev/b327c38531cc
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
I can reproduce this issue on Firefox 53.0a1 (20161121030224), here is a video: http://screencast.com/t/ifbpMQCZc55y 

This issue is verified as fixed on Firefox 53.0a1 (20161124030208) under Windows 7 64-bit, the method getRedirectURL with no parameter does not add a null value in the URL.
Here is a video: http://screencast.com/t/TbgWXCsLSj
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.