Commit 3cc32db7 authored by Drew Stonebraker's avatar Drew Stonebraker Committed by Commit Bot

Add tests for webview channel precedence

Channel-specific versionCodes for standalone webview need to be in a
specific order so the correct channels have precedence over others.

Follow-up CL to http://crrev/c/1547757

Bug: 919216
Change-Id: I085ee25dc4029cf3edb3b3f5b0d2257267adc800
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1550011Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Drew Stonebraker <stonebraker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#647130}
parent 1beb548a
......@@ -244,6 +244,42 @@ class _VersionTest(unittest.TestCase):
self.assertLess(x86_chrome_version_code, x64_chrome_version_code)
def testGenerateVersionCodesAndroidWebviewChannelOrderBeta(self):
"""Assert webview beta channel is higher than stable.
The channel-specific version codes for standalone webview needs to follow
the order stable < beta < dev.
This allows that if a user opts into beta track, they will always have the
beta apk, including any finch experiments targeted at beta users, even when
beta and stable channels are otherwise on the same version.
"""
output = GenerateVersionCodes(
self.EXAMPLE_VERSION_VALUES, arch='arm', is_next_build=False)
webview_stable_version_code = output['WEBVIEW_STABLE_VERSION_CODE']
webview_beta_version_code = output['WEBVIEW_BETA_VERSION_CODE']
self.assertGreater(webview_beta_version_code, webview_stable_version_code)
def testGenerateVersionCodesAndroidWebviewChannelOrderDev(self):
"""Assert webview dev channel is higher than beta.
The channel-specific version codes for standalone webview needs to follow
the order stable < beta < dev.
This allows that if a user opts into dev track, they will always have the
dev apk, including any finch experiments targeted at dev users, even when
dev and beta channels are otherwise on the same version.
"""
output = GenerateVersionCodes(
self.EXAMPLE_VERSION_VALUES, arch='arm', is_next_build=False)
webview_beta_version_code = output['WEBVIEW_BETA_VERSION_CODE']
webview_dev_version_code = output['WEBVIEW_DEV_VERSION_CODE']
self.assertGreater(webview_dev_version_code, webview_beta_version_code)
if __name__ == '__main__':
unittest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment