Closed
Bug 995198
Opened 12 years ago
Closed 12 years ago
Uncaught async Promise errors should appear as soon as possible during xpcshell tests
Categories
(Testing :: XPCShell Harness, defect)
Testing
XPCShell Harness
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: Yoric, Assigned: Yoric)
References
Details
Attachments
(2 files, 2 obsolete files)
|
10.45 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
|
3.32 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
Subset of bug 976205 that can land without blockers.
| Assignee | ||
Updated•12 years ago
|
Summary: Uncaught async Promise errors should appear as soon as possible → Uncaught async Promise errors should appear as soon as possible during xpcshell tests
| Assignee | ||
Comment 1•12 years ago
|
||
This patch has been reviewed by Paolo as part of bug 976205.
Assignee: nobody → dteller
Attachment #8405622 -
Flags: review+
| Assignee | ||
Comment 2•12 years ago
|
||
Patch reviewed by ted as part of bug 976205 + trivial string change.
Attachment #8405623 -
Flags: review+
| Assignee | ||
Comment 3•12 years ago
|
||
| Assignee | ||
Comment 4•12 years ago
|
||
I have tweaked xpcshell's head.js a little bit more.
Summary of changes:
* since we always use Promise, we now import it eagerly as global _Promise;
* instead of a TEST-UNEXPECTED-FAIL, we now display a TEST-KNOWN-FAIL and a scary warning.
Attachment #8405623 -
Attachment is obsolete: true
Attachment #8405758 -
Flags: review?(ted)
Comment 5•12 years ago
|
||
Comment on attachment 8405758 [details] [diff] [review]
2. Print uncaught async errors at each run_next_test / add_task., v2
Review of attachment 8405758 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/xpcshell/head.js
@@ +18,5 @@
> var _cleanupFunctions = [];
> var _pendingTimers = [];
> var _profileInitialized = false;
>
> +let _Promise = Components.utils.import("resource://gre/modules/Promise.jsm", this).Promise;
We should really scope everything in this file to avoid it leaking out to tests. (But you don't have to fix that.)
@@ +1438,5 @@
> throw new Error("run_next_test() called from an add_task() test function. " +
> "run_next_test() should not be called from inside add_task() " +
> "under any circumstances!");
> }
> +
nit: whitespace
::: testing/xpcshell/xpcshell_b2g.ini
@@ +6,5 @@
> [include:dom/mobilemessage/tests/xpcshell.ini]
> [include:dom/network/tests/unit_stats/xpcshell.ini]
> [include:dom/system/gonk/tests/xpcshell.ini]
> [include:dom/wappush/tests/xpcshell.ini]
> +[include:toolkit/components/osfile/tests/xpcshell/xpcshell.ini]
This seems unrelated?
Attachment #8405758 -
Flags: review?(ted) → review+
| Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #5)
> Comment on attachment 8405758 [details] [diff] [review]
> 2. Print uncaught async errors at each run_next_test / add_task., v2
>
> Review of attachment 8405758 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: testing/xpcshell/head.js
> @@ +18,5 @@
> > var _cleanupFunctions = [];
> > var _pendingTimers = [];
> > var _profileInitialized = false;
> >
> > +let _Promise = Components.utils.import("resource://gre/modules/Promise.jsm", this).Promise;
>
> We should really scope everything in this file to avoid it leaking out to
> tests. (But you don't have to fix that.)
That's what I was thinking. Filed as bug 996652.
| Assignee | ||
Comment 7•12 years ago
|
||
Applied feedback.
Try: https://tbpl.mozilla.org/?tree=Try&rev=61af13329e8c
Attachment #8405758 -
Attachment is obsolete: true
Attachment #8406911 -
Flags: review+
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/963eaafdb70f
https://hg.mozilla.org/integration/mozilla-inbound/rev/1dbade92ce0a
Flags: in-testsuite+
Keywords: checkin-needed
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/963eaafdb70f
https://hg.mozilla.org/mozilla-central/rev/1dbade92ce0a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•