mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1268912 - Use unicode apostrophe for client.name2 in sync properties, working around issues with sync tests. r=markh
MozReview-Commit-ID: 5XArwMUQwQF --HG-- extra : transplant_source : %AA0%A4%EF%FF%A6%3Fu%08l%C4%2A%E2I%7Ef-%5D%A9H
This commit is contained in:
parent
42d6998ea0
commit
8e8bdc52cc
@ -100,10 +100,6 @@ let gWhitelist = [{
|
||||
file: "netErrorApp.dtd",
|
||||
key: "securityOverride.warningContent",
|
||||
type: "single-quote"
|
||||
}, {
|
||||
file: "sync.properties",
|
||||
key: "client.name2",
|
||||
type: "apostrophe"
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -77,7 +77,7 @@ Local.prototype = {
|
||||
// fall back on ua info string
|
||||
Cc["@mozilla.org/network/protocol;1?name=http"].getService(Ci.nsIHttpProtocolHandler).oscpu;
|
||||
|
||||
return this.name = Str.sync.get("client.name2", [user, appName, system]);
|
||||
return this.name = Str.sync.get("client.name3", [user, appName, system]);
|
||||
},
|
||||
|
||||
set name(value) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# %1: the user name (Ed), %2: the app name (Firefox), %3: the operating system (Android)
|
||||
client.name2 = %1$S's %2$S on %3$S
|
||||
client.name3 = %1$S’s %2$S on %3$S
|
||||
|
||||
# %S is the date and time at which the last sync successfully completed
|
||||
lastSync2.label = Last sync: %S
|
||||
|
@ -671,7 +671,7 @@ this.Utils = {
|
||||
// fall back on ua info string
|
||||
Cc["@mozilla.org/network/protocol;1?name=http"].getService(Ci.nsIHttpProtocolHandler).oscpu;
|
||||
|
||||
return Str.sync.get("client.name2", [user, appName, system]);
|
||||
return Str.sync.get("client.name3", [user, appName, system]);
|
||||
},
|
||||
|
||||
getDeviceName() {
|
||||
|
@ -4,6 +4,7 @@
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://testing-common/services/common/utils.js");
|
||||
Cu.import("resource://testing-common/PlacesTestUtils.jsm");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, 'SyncPingSchema', function() {
|
||||
@ -390,3 +391,12 @@ function sync_engine_and_validate_telem(engine, allowErrorPings, onError) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Avoid an issue where `client.name3` containing unicode characters causes
|
||||
// a number of tests to fail, due to them assuming that we do not need to utf-8
|
||||
// encode or decode data sent through the mocked server (see bug 1268912).
|
||||
Utils.getDefaultDeviceName = function() {
|
||||
return "Test device name";
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user