Closed Bug 660338 Opened 15 years ago Closed 10 years ago

Discover and implement better a better way of handling events for actions

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

Details

(Whiteboard: [module-refactor])

Right now our event handling is kinda broken in some cases. We register event handlers after the action has already been fired off. In most cases we will miss the appropriate event send by the target node. Therefore we have to re-think how we handle events. In the Mozmill's controller.js is already an event handler class but that's crappy and will leak a lot of memory. In general it should help us with: * Having centralized code which handles the registration/unregistration of event handlers, and waiting for events. * Providing a callback handler which let the test execute the action it wants. We don't want to add all variations of code in our modules. Example: TabBrowser.openTab(aCallback) { function default() { use shortcut } if (!aCallback) aCallback = default; event.waitFor(this.browser._window, "TabOpen", aCallback); } testOpenTab() { openTab(function () { browser.keypress("T", {accelKey: true}); // or menu, or mouse click, .... }); } Geo, lets get this discussed later. But can you please target it for a milestone of the refactoring project? It should not get lost. Due to it's mostly backend stuff it can be in early Q3.
Mozmill tests are no longer in use. So closing this bug.
Status: NEW → RESOLVED
Closed: 10 years ago
QA Contact: hskupin
Resolution: --- → WONTFIX
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.