From 0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 6 Oct 2018 06:57:51 +0200 Subject: Import Tycho weave client --- .../extensions/mozmill/resource/driver/controller.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'services/sync/tps/extensions/mozmill/resource/driver/controller.js') 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 { -- cgit v1.2.3