diff options
Diffstat (limited to 'services/sync/tps/extensions/mozmill/resource/driver/controller.js')
-rw-r--r-- | services/sync/tps/extensions/mozmill/resource/driver/controller.js | 19 |
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 { |