summaryrefslogtreecommitdiffstats
path: root/services/sync/tps/extensions/mozmill/resource/driver/controller.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
commit0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (patch)
treec321601f04cbfd02fb6e12878e745dc49a612c86 /services/sync/tps/extensions/mozmill/resource/driver/controller.js
parent8860eddcee1417483cafd114f3a9ec127e0f1f74 (diff)
downloadUXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.gz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.lz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.xz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.zip
Import Tycho weave client
Diffstat (limited to 'services/sync/tps/extensions/mozmill/resource/driver/controller.js')
-rw-r--r--services/sync/tps/extensions/mozmill/resource/driver/controller.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/services/sync/tps/extensions/mozmill/resource/driver/controller.js b/services/sync/tps/extensions/mozmill/resource/driver/controller.js
index 8d66a41ae..d5948598e 100644
--- a/services/sync/tps/extensions/mozmill/resource/driver/controller.js
+++ b/services/sync/tps/extensions/mozmill/resource/driver/controller.js
@@ -5,9 +5,9 @@
var EXPORTED_SYMBOLS = ["MozMillController", "globalEventRegistry",
"sleep", "windowMap"];
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const Cu = Components.utils;
var EventUtils = {}; Cu.import('resource://mozmill/stdlib/EventUtils.js', EventUtils);
@@ -44,11 +44,7 @@ waitForEvents.prototype = {
node.firedEvents = {};
this.registry = {};
- if (!events) {
- return;
- }
- for (var key in events) {
- var e = events[key];
+ for each (var e in events) {
var listener = function (event) {
this.firedEvents[event.type] = true;
}
@@ -870,7 +866,7 @@ MozMillController.prototype.mouseMove = function (doc, start, dest) {
/**
* Drag an element to the specified offset on another element, firing mouse and
- * drag events. Adapted from EventUtils.js synthesizeDrop()
+ * drag events. Adapted from ChromeUtils.js synthesizeDrop()
*
* @deprecated Use the MozMillElement object
*
@@ -977,10 +973,7 @@ function browserAdditions (controller) {
return windows.map.hasPageLoaded(utils.getWindowId(win));
}, "Timeout", timeout, aInterval);
}
- catch (ex) {
- if (!(ex instanceof errors.TimeoutError)) {
- throw ex;
- }
+ catch (ex if ex instanceof errors.TimeoutError) {
timed_out = true;
}
finally {