зеркало из https://github.com/mozilla/gecko-dev.git
Bug 424712 - Server location needs a slash at the end. r=rnewman
This commit is contained in:
Родитель
b2ba5959ec
Коммит
fc42a78b29
|
@ -74,6 +74,10 @@ Sync11Service.prototype = {
|
|||
|
||||
get serverURL() Svc.Prefs.get("serverURL"),
|
||||
set serverURL(value) {
|
||||
if (!value.endsWith("/")) {
|
||||
value += "/";
|
||||
}
|
||||
|
||||
// Only do work if it's actually changing
|
||||
if (value == this.serverURL)
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
Cu.import("resource://services-sync/service.js");
|
||||
|
||||
function run_test() {
|
||||
Service.serverURL = "http://example.com/sync";
|
||||
do_check_eq(Service.serverURL, "http://example.com/sync/");
|
||||
|
||||
Service.serverURL = "http://example.com/sync/";
|
||||
do_check_eq(Service.serverURL, "http://example.com/sync/");
|
||||
}
|
||||
|
|
@ -67,6 +67,7 @@ skip-if = os == "android"
|
|||
[test_service_migratePrefs.js]
|
||||
[test_service_passwordUTF8.js]
|
||||
[test_service_persistLogin.js]
|
||||
[test_service_set_serverURL.js]
|
||||
[test_service_startOver.js]
|
||||
[test_service_startup.js]
|
||||
[test_service_sync_401.js]
|
||||
|
|
Загрузка…
Ссылка в новой задаче