Closed Bug 988341 Opened 12 years ago Closed 12 years ago

Convert code before switching Task.jsm to use Promise.jsm

Categories

(Toolkit :: Async Tooling, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: Paolo, Assigned: Paolo)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch The patch (obsolete) — Splinter Review
This is a dependency of bug 887923, including the simpler code conversions. https://tbpl.mozilla.org/?tree=Try&rev=c06ddfb8bcf5
Attachment #8397099 - Flags: review?(mak77)
Comment on attachment 8397099 [details] [diff] [review] The patch Review of attachment 8397099 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/modules/test/browser_UITour.js @@ +124,2 @@ > gContentAPI.showMenu("appMenu"); > + shownPromise.then(() => { while I'd have preferred to change the test runner to run these as Task(s) (and thus save a lot of blame with a simple yield), I don't think I care that much. just move on. ::: browser/modules/test/head.js @@ +82,5 @@ > +function promisePanelElementShown(win, aPanel) { > + let deferred = Promise.defer(); > + let timeoutId = win.setTimeout(() => { > + deferred.reject("Panel did not show within 20 seconds."); > + }, 20000); I'd probably reduce this, 5 seconds should be enough. 20 seconds is going too close to the test harness timeout, and tests are already taking too much, so if we find this taking more than 5 seconds we should seriously look at the code... @@ +88,5 @@ > + aPanel.removeEventListener("popupshown", onPanelOpen); > + win.clearTimeout(timeoutId); > + deferred.resolve(); > + }; > + aPanel.addEventListener("popupshown", onPanelOpen); really nit: I'd probably inline the function here, to save a line of code
Attachment #8397099 - Flags: review?(mak77) → review+
Attached patch Updated patchSplinter Review
Attachment #8397099 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 996671
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: