mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Merge central to inbound
This commit is contained in:
commit
483472ec0a
@ -144,10 +144,10 @@ nsSVGFE::SetupScalingFilter(nsSVGFilterInstance *aInstance,
|
||||
return result;
|
||||
}
|
||||
|
||||
float kernelX = aInstance->GetPrimitiveNumber(nsSVGUtils::X,
|
||||
gfxFloat kernelX = aInstance->GetPrimitiveNumber(nsSVGUtils::X,
|
||||
aKernelUnitLength,
|
||||
nsSVGNumberPair::eFirst);
|
||||
float kernelY = aInstance->GetPrimitiveNumber(nsSVGUtils::Y,
|
||||
gfxFloat kernelY = aInstance->GetPrimitiveNumber(nsSVGUtils::Y,
|
||||
aKernelUnitLength,
|
||||
nsSVGNumberPair::eSecond);
|
||||
if (kernelX <= 0 || kernelY <= 0)
|
||||
|
@ -295,6 +295,16 @@ ServerCollection.prototype = {
|
||||
return this.insertWBO(new ServerWBO(id, payload, modified));
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes an object entirely from the collection.
|
||||
*
|
||||
* @param id
|
||||
* (string) ID to remove.
|
||||
*/
|
||||
remove: function remove(id) {
|
||||
delete this._wbos[id];
|
||||
},
|
||||
|
||||
_inResultSet: function(wbo, options) {
|
||||
return wbo.payload
|
||||
&& (!options.ids || (options.ids.indexOf(wbo.id) != -1))
|
||||
@ -544,7 +554,15 @@ function track_collections_helper() {
|
||||
*/
|
||||
let SyncServerCallback = {
|
||||
onCollectionDeleted: function onCollectionDeleted(user, collection) {},
|
||||
onItemDeleted: function onItemDeleted(user, collection, wboID) {}
|
||||
onItemDeleted: function onItemDeleted(user, collection, wboID) {},
|
||||
|
||||
/**
|
||||
* Called at the top of every request.
|
||||
*
|
||||
* Allows the test to inspect the request. Hooks should be careful not to
|
||||
* modify or change state of the request or they may impact future processing.
|
||||
*/
|
||||
onRequest: function onRequest(request) {},
|
||||
};
|
||||
|
||||
/**
|
||||
@ -822,6 +840,11 @@ SyncServer.prototype = {
|
||||
|
||||
_handleDefault: function _handleDefault(handler, req, resp) {
|
||||
this._log.debug("SyncServer: Handling request: " + req.method + " " + req.path);
|
||||
|
||||
if (this.callback.onRequest) {
|
||||
this.callback.onRequest(req);
|
||||
}
|
||||
|
||||
let parts = this.pathRE.exec(req.path);
|
||||
if (!parts) {
|
||||
this._log.debug("SyncServer: Unexpected request: bad URL " + req.path);
|
||||
|
@ -124,7 +124,6 @@ function setUp() {
|
||||
Service.serverURL = TEST_SERVER_URL;
|
||||
Service.clusterURL = TEST_CLUSTER_URL;
|
||||
|
||||
|
||||
return generateAndUploadKeys();
|
||||
}
|
||||
|
||||
@ -1601,6 +1600,14 @@ add_test(function test_sync_engine_generic_fail() {
|
||||
let log = Log4Moz.repository.getLogger("Sync.ErrorHandler");
|
||||
Svc.Prefs.set("log.appender.file.logOnError", true);
|
||||
|
||||
do_check_eq(Status.engines["catapult"], undefined);
|
||||
|
||||
// Don't wait for reset-file-log until the sync is underway.
|
||||
// This avoids us catching a delayed notification from an earlier test.
|
||||
Svc.Obs.add("weave:engine:sync:finish", function onEngineFinish() {
|
||||
Svc.Obs.remove("weave:engine:sync:finish", onEngineFinish);
|
||||
|
||||
log.info("Adding reset-file-log observer.");
|
||||
Svc.Obs.add("weave:service:reset-file-log", function onResetFileLog() {
|
||||
Svc.Obs.remove("weave:service:reset-file-log", onResetFileLog);
|
||||
|
||||
@ -1620,8 +1627,8 @@ add_test(function test_sync_engine_generic_fail() {
|
||||
clean();
|
||||
server.stop(run_next_test);
|
||||
});
|
||||
});
|
||||
|
||||
do_check_eq(Status.engines["catapult"], undefined);
|
||||
do_check_true(setUp());
|
||||
Service.sync();
|
||||
});
|
||||
|
@ -67,9 +67,11 @@ function server_report(request, response) {
|
||||
}
|
||||
|
||||
// Hook for test code.
|
||||
let hooks = {
|
||||
onGET: function onGET(request) {}
|
||||
let hooks = {};
|
||||
function initHooks() {
|
||||
hooks.onGET = function onGET(request) {};
|
||||
}
|
||||
initHooks();
|
||||
|
||||
function ServerChannel() {
|
||||
this.data = "";
|
||||
@ -271,11 +273,19 @@ add_test(function test_firstMsgMaxTries() {
|
||||
// For the purpose of the tests, the poll interval is 50ms and
|
||||
// we're polling up to 5 times for the first exchange (as
|
||||
// opposed to 2 times for most of the other exchanges). So let's
|
||||
// pretend it took 150ms to enter the PIN on the sender.
|
||||
_("Received PIN " + pin + ". Waiting 150ms before entering it into sender...");
|
||||
// pretend it took 150ms to enter the PIN on the sender, which should
|
||||
// require 3 polls.
|
||||
// Rather than using an imprecise timer, we hook into the channel's
|
||||
// GET handler to know how long to wait.
|
||||
_("Received PIN " + pin + ". Waiting for three polls before entering it into sender...");
|
||||
this.cid = pin.slice(JPAKE_LENGTH_SECRET);
|
||||
Utils.namedTimer(function() { snd.pairWithPIN(pin, false); },
|
||||
150, this, "_sendTimer");
|
||||
let count = 0;
|
||||
hooks.onGET = function onGET(request) {
|
||||
if (++count == 3) {
|
||||
_("Third GET. Triggering pair.");
|
||||
Utils.nextTick(function() { snd.pairWithPIN(pin, false); });
|
||||
}
|
||||
};
|
||||
},
|
||||
onPairingStart: function onPairingStart(pin) {},
|
||||
onComplete: function onComplete(data) {
|
||||
@ -283,6 +293,9 @@ add_test(function test_firstMsgMaxTries() {
|
||||
// Ensure channel was cleared, no error report.
|
||||
do_check_eq(channels[this.cid].data, undefined);
|
||||
do_check_eq(error_report, undefined);
|
||||
|
||||
// Clean up.
|
||||
initHooks();
|
||||
run_next_test();
|
||||
}
|
||||
});
|
||||
@ -329,7 +342,7 @@ add_test(function test_lastMsgMaxTries() {
|
||||
do_check_eq(error_report, undefined);
|
||||
|
||||
// Clean up.
|
||||
hooks.onGET = function onGET(request) {};
|
||||
initHooks();
|
||||
run_next_test();
|
||||
}
|
||||
});
|
||||
@ -420,14 +433,22 @@ add_test(function test_abort_sender() {
|
||||
// Ensure channel was cleared, no error report.
|
||||
do_check_eq(channels[this.cid].data, undefined);
|
||||
do_check_eq(error_report, undefined);
|
||||
initHooks();
|
||||
run_next_test();
|
||||
},
|
||||
displayPIN: function displayPIN(pin) {
|
||||
_("Received PIN " + pin + ". Entering it in the other computer...");
|
||||
this.cid = pin.slice(JPAKE_LENGTH_SECRET);
|
||||
Utils.nextTick(function() { snd.pairWithPIN(pin, false); });
|
||||
Utils.namedTimer(function() { snd.abort(); },
|
||||
POLLINTERVAL, this, "_abortTimer");
|
||||
|
||||
// Abort after the first poll.
|
||||
let count = 0;
|
||||
hooks.onGET = function onGET(request) {
|
||||
if (++count >= 1) {
|
||||
_("First GET. Aborting.");
|
||||
Utils.nextTick(function() { snd.abort(); });
|
||||
}
|
||||
};
|
||||
},
|
||||
onPairingStart: function onPairingStart(pin) {}
|
||||
});
|
||||
|
@ -3,7 +3,7 @@
|
||||
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY resetProfile.dialog.title "Reset &brandShortName;">
|
||||
<!ENTITY resetProfile.dialog.description "Are you sure you want to reset Firefox to its initial state?">
|
||||
<!ENTITY resetProfile.dialog.description "Are you sure you want to reset &brandShortName; to its initial state?">
|
||||
<!ENTITY resetProfile.dialog.items.label "The following will be preserved:">
|
||||
<!ENTITY resetProfile.dialog.footer.label "&brandShortName; will restart and everything else will be removed.">
|
||||
<!ENTITY resetProfile.dialog.button.label "Reset &brandShortName;">
|
||||
|
Loading…
Reference in New Issue
Block a user