diff --git a/mozilla/testing/tests/l10n/web/search-code.js b/mozilla/testing/tests/l10n/web/search-code.js
index b8ae560b4fb..702be46adb7 100755
--- a/mozilla/testing/tests/l10n/web/search-code.js
+++ b/mozilla/testing/tests/l10n/web/search-code.js
@@ -46,6 +46,7 @@ for each (loc in Tier2) tierMap[loc] = 'Tier-2';
var view;
view = {
+ hashes: {},
updateView: function() {
this._gView = document.getElementById("view");
var cmp = function(l,r) {
@@ -92,15 +93,19 @@ view = {
//YAHOO.widget.Logger.log('testing ' + path);
var innerContent;
var cl = '';
+ if (path.match(/^mozilla/)) {
+ cl += ' enUS';
+ }
+ var localName = path.substr(path.lastIndexOf('/') + 1)
if (results.details[path].error) {
- innerContent = 'error in ' + path.substr(path.lastIndexOf('/') + 1);
- cl = ' error';
+ innerContent = 'error in ' + localName;
+ cl += ' error';
}
else {
var shortName = results.details[path].ShortName;
var img = results.details[path].Image;
if (results.locales[loc].orders && results.locales[loc].orders[shortName]) {
- cl = " ordered";
+ cl += " ordered";
}
innerContent = '
' + shortName;
}
@@ -109,8 +114,38 @@ view = {
td.innerHTML = innerContent;
row.appendChild(td);
td.details = results.details[path];
+ // test the hash code
+ if (td.details.error) {
+ // ignore errorenous plugins
+ continue;
+ }
+ if (this.hashes[localName]) {
+ this.hashes[localName].nodes.push(td);
+ if (this.hashes[localName].conflict) {
+ td.className += ' conflict';
+ }
+ else if (this.hashes[localName].key != td.details.md5) {
+ this.hashes[localName].conflict = true;
+ for each (td in this.hashes[localName].nodes) {
+ td.className += ' conflict';
+ }
+ }
+ }
+ else {
+ this.hashes[localName] = {key: td.details.md5, nodes: [td]};
+ }
}
}
+ for (localName in this.hashes) {
+ if ( ! ('conflict' in this.hashes[localName])) {
+ continue;
+ }
+ locs = [];
+ for each (var td in this.hashes[localName].nodes) {
+ locs.push(td.parentNode.firstChild.textContent);
+ }
+ YAHOO.widget.Logger.log('difference in ' + localName + ' for ' + locs.join(', '));
+ }
},
onMouseOver: function(event) {
if (!event.target.details)
diff --git a/mozilla/testing/tests/l10n/web/search-engines.html b/mozilla/testing/tests/l10n/web/search-engines.html
index 85b33ad0265..8457edad755 100755
--- a/mozilla/testing/tests/l10n/web/search-engines.html
+++ b/mozilla/testing/tests/l10n/web/search-engines.html
@@ -56,6 +56,8 @@