Bug 987147 - [tps] Re-add support for old sync authentication. r=jgriffin DONTBUILD

This commit is contained in:
Henrik Skupin 2014-03-26 07:30:33 +01:00
parent b1bd8b4503
commit bfca5397f9

View File

@ -313,9 +313,11 @@ class TPSTestRunner(object):
if self.mobile:
self.preferences.update({'services.sync.client.type' : 'mobile'})
# If sync accounts have been chosen, disable Firefox Accounts
if self.config.get('auth_type', 'fx_account') != 'fx_account':
self.preferences.update({'services.sync.fxaccounts.enabled' : False})
# Set a dummy username to force the correct authentication type. For the
# old sync, the username is not allowed to contain a '@'.
dummy = {'fx_account': 'dummy@somewhere', 'sync_account': 'dummy'}
auth_type = self.config.get('auth_type', 'fx_account')
self.preferences.update({'services.sync.username': dummy[auth_type]})
# Acquire a lock to make sure no other threads are running tests
# at the same time.