From bcb1eebb04f58e47069231a7aff5c2a911abab43 Mon Sep 17 00:00:00 2001 From: "axel%pike.org" Date: Fri, 8 Sep 2006 18:03:19 +0000 Subject: [PATCH] bug 348731, check for default engine to be first, log that git-svn-id: svn://10.0.0.236/trunk@209449 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/testing/tests/l10n/lib/Mozilla/Tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mozilla/testing/tests/l10n/lib/Mozilla/Tests.py b/mozilla/testing/tests/l10n/lib/Mozilla/Tests.py index 4384264ac04..4af8b4596e9 100755 --- a/mozilla/testing/tests/l10n/lib/Mozilla/Tests.py +++ b/mozilla/testing/tests/l10n/lib/Mozilla/Tests.py @@ -269,6 +269,8 @@ class SearchTest(Base): m = re.match('browser.search.order.([1-9])', key) if m: orders[val.strip()] = int(m.group(1)) + elif key == 'browser.search.defaultenginename': + sets[loc]['default'] = val.strip() sets[loc]['orders'] = orders for fn in lst: name = fn.strip() @@ -306,7 +308,17 @@ class SearchTest(Base): ''' for loc, val in myResult['locales'].iteritems(): + l = logging.getLogger('locales.' + loc) + # Verify that there are no errors in the engine parsing, + # and that there default engine is the first one. + if (not val['orders'].has_key(val['default'])) or val['orders'][val['default']] != 1: + l.error('Default engine is not first in order') + if not failureResult.has_key(loc): + failureResult[loc] = 2 + else: + failureResult[loc] |= 2 for p in val['list']: + # no logging, that is already reported above if myResult['details'][p].has_key('error'): if not failureResult.has_key(loc): failureResult[loc] = 2