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)
Toolkit
Async Tooling
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: Paolo, Assigned: Paolo)
References
Details
Attachments
(1 file, 1 obsolete file)
|
11.90 KB,
patch
|
Details | Diff | 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 1•12 years ago
|
||
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+
| Assignee | ||
Comment 2•12 years ago
|
||
Attachment #8397099 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•