Skip to content

Commit

Permalink
Revert "Fix Bug 1357379 - Download links for Dev Edition will need to…
Browse files Browse the repository at this point in the history
… be updated post Dawn"
  • Loading branch information
pmac committed Jun 13, 2017
1 parent 9223f64 commit 6a88aa2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
11 changes: 5 additions & 6 deletions bedrock/firefox/firefox_details.py
Expand Up @@ -222,20 +222,19 @@ def get_download_url(self, channel, version, platform, locale,
include_funnelcake_param = _platform in fc_platforms and _locale in fc_locales

stub_langs = settings.STUB_INSTALLER_LOCALES.get(channel, {}).get(_platform, [])
# Nightly and Developer Edition have a special download link format
# see bug 1324001, 1357379
# Nightly and Aurora have a special download link format
# see bug 1324001
if channel in ['alpha', 'nightly']:
prod_name = 'firefox-nightly' if channel == 'nightly' else 'firefox-devedition'
prod_name = 'firefox-nightly' if channel == 'nightly' else 'firefox-aurora'
# Use the stub installer for approved platforms
if (stub_langs and (stub_langs == settings.STUB_INSTALLER_ALL or _locale.lower() in stub_langs) and
not force_full_installer):
# Download links are different for localized versions
suffix = 'stub'
elif channel == 'nightly' and locale != 'en-US':
# Nightly uses a different product name for localized builds
suffix = 'latest-l10n-ssl'
else:
suffix = 'latest-ssl'
if locale != 'en-US':
suffix = 'latest-l10n-ssl'

product = '%s-%s' % (prod_name, suffix)

Expand Down
49 changes: 23 additions & 26 deletions bedrock/firefox/tests/test_firefox_details.py
Expand Up @@ -98,96 +98,93 @@ def test_get_download_url(self):
('os', 'linux64'),
('lang', 'en-US')])

def test_get_download_url_devedition(self):
def test_get_download_url_aurora(self):
"""
The Developer Edition version should give us a bouncer url. For Windows,
a stub url should be returned.
The Aurora version should give us a bouncer url. For Windows, a stub url
should be returned.
"""
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'win', 'en-US', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-stub'),
[('product', 'firefox-aurora-stub'),
('os', 'win'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'win64', 'en-US', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'win64'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'osx', 'en-US', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'osx'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'linux', 'en-US', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'linux'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'linux64', 'en-US', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'linux64'),
('lang', 'en-US')])

def test_get_download_url_devedition_full(self):
def test_get_download_url_aurora_full(self):
"""
The Developer Edition version should give us a bouncer url. For Windows,
a full url should be returned.
The Aurora version should give us a bouncer url. For Windows, a full url
should be returned.
"""
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'win', 'en-US', True, True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'win'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'win64', 'en-US', True, True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'win64'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'osx', 'en-US', True, True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'osx'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'linux', 'en-US', True, True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'linux'),
('lang', 'en-US')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'linux64', 'en-US', True, True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-ssl'),
('os', 'linux64'),
('lang', 'en-US')])

def test_get_download_url_devedition_l10n(self):
"""
The Developer Edition version should give us a bouncer url. For Windows,
a full url should be returned. The product name is the same as en-US.
"""
def test_get_download_url_aurora_l10n(self):
"""Aurora non en-US should have a slightly different product name."""
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'win', 'pt-BR', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-l10n-ssl'),
('os', 'win'),
('lang', 'pt-BR')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'win64', 'pt-BR', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-l10n-ssl'),
('os', 'win64'),
('lang', 'pt-BR')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'osx', 'pt-BR', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-l10n-ssl'),
('os', 'osx'),
('lang', 'pt-BR')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'linux', 'pt-BR', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-l10n-ssl'),
('os', 'linux'),
('lang', 'pt-BR')])
url = firefox_desktop.get_download_url('alpha', '28.0a2', 'linux64', 'pt-BR', True)
self.assertListEqual(parse_qsl(urlparse(url).query),
[('product', 'firefox-devedition-latest-ssl'),
[('product', 'firefox-aurora-latest-l10n-ssl'),
('os', 'linux64'),
('lang', 'pt-BR')])

Expand Down

0 comments on commit 6a88aa2

Please sign in to comment.