Bug 995599 - prevent services tests hitting the network. r=rnewman

--HG--
extra : rebase_source : f38fefae031f4cbd94215ee61f89a553b1f5c272
This commit is contained in:
Mark Hammond 2014-06-10 12:02:39 +10:00
parent 028ca01a20
commit 783db8b7f4
3 changed files with 7 additions and 1 deletions

View File

@ -176,7 +176,8 @@ add_task(function test_get_signed_in_user_initially_unset() {
do_check_eq(result.kB, credentials.kB);
// sign out
yield account.signOut();
let localOnly = true;
yield account.signOut(localOnly);
// user should be undefined after sign out
let result = yield account.getSignedInUser();

View File

@ -27,6 +27,10 @@ add_task(function* test_startover() {
// we expect the "legacy" provider (but can't instanceof that, as BrowserIDManager
// extends it)
do_check_false(Service.identity instanceof BrowserIDManager);
Service.serverURL = "https://localhost/";
Service.clusterURL = Service.serverURL;
Service.login();
// We should have a cluster URL
do_check_true(Service.clusterURL.length > 0);

View File

@ -32,6 +32,7 @@ add_test(function test_change_password() {
try {
Service.baseURI = "http://localhost:9999/";
Service.serverURL = "http://localhost:9999/";
setBasicCredentials("johndoe", "ilovejane");
_("changePassword() returns false for a network error, the password won't change.");