merge upstream changes

This commit is contained in:
Dan Mills 2008-06-30 23:42:00 -07:00
commit e53b8d1689
3 changed files with 15 additions and 2 deletions

View File

@ -14,7 +14,7 @@
<!ENTITY eula.decline "I do NOT accept the terms of the License Agreement">
<!ENTITY welcome.title "Setup Options">
<!ENTITY curUser-title.label "Set up Another Computer">
<!ENTITY curUser-title.label "Set Up Another Computer">
<!ENTITY curUser.description "Sign in and associate this computer with your existing Weave account.">
<!ENTITY newUser-title.label "Get Started with Weave">
<!ENTITY newUser.description "Create a new account and configure the automated backup and synchronization of your browser settings and metadata to a Weave server.">

View File

@ -41,6 +41,7 @@ const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://weave/async.js");
Cu.import("resource://weave/identity.js");
Function.prototype.async = Async.sugar;
@ -58,6 +59,7 @@ Api.prototype = {
_shareGenerator: function Api__shareGenerator(path, users) {
let self = yield;
let id = ID.get(this._dav.identity);
this._dav.defaultPrefix = "";
@ -67,7 +69,11 @@ Api.prototype = {
let jsonSvc = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
let json = jsonSvc.encode(cmd);
this._dav.POST("share/", "cmd=" + escape(json), self.cb);
this._dav.POST("share/",
("cmd=" + escape(json) +
"&uid=" + escape(id.username) +
"&password=" + escape(id.password)),
self.cb);
let xhr = yield;
let retval;

View File

@ -1,11 +1,18 @@
Cu.import("resource://weave/sharing.js");
Cu.import("resource://weave/util.js");
Cu.import("resource://weave/identity.js");
function runTestGenerator() {
let self = yield;
ID.set("blarg", new Identity("realm", "myusername", "mypass"));
let fakeDav = {
identity: "blarg",
POST: function fakeDav_POST(url, data, callback) {
do_check_true(data.indexOf("uid=myusername") != -1);
do_check_true(data.indexOf("password=mypass") != -1);
do_check_true(data.indexOf("/fake/dir") != -1);
do_check_true(data.indexOf("johndoe") != -1);
let result = {status: 200, responseText: "OK"};
Utils.makeTimerForCall(function() { callback(result); });
}