mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 424712 - Server location needs a slash at the end. r=rnewman
This commit is contained in:
parent
451ff8f738
commit
565345c3a0
@ -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;
|
||||
|
13
services/sync/tests/unit/test_service_set_serverURL.js
Normal file
13
services/sync/tests/unit/test_service_set_serverURL.js
Normal file
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user