Closed
Bug 1261816
Opened 8 years ago
Closed 8 years ago
JS error thrown after end of test can cause finish() to be called twice
Categories
(Testing :: Mochitest, defect)
Tracking
(firefox46 wontfix, firefox47 fixed, firefox48 fixed)
RESOLVED
FIXED
mozilla48
People
(Reporter: kats, Assigned: kats)
Details
Attachments
(1 file)
1.00 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
While working on bug 1261158 I ran into a situation where I was running |./mach mochitest --e10s -f plain image/test/mochitest/test_xultree_animation.xhtml|, the test ran and successfully completed, and then when I closed the browser window, the browser shutdown process would throw a JS error. The JS error was caught by the mochitest harness, handled in [1], but then [2] was invoked. This call to SimpleTest.finish() was in addition to the SimpleTest.finish() that the test already did, and so it caused a failure of the type "finish() already called" [3]. Now it may very well be that JS errors thrown during the shutdown process are intended to cause test failures, but if so, they should do so via handling in the code at [1], rather than the indirect "finish() already called" thing that was happening here. I think it makes sense to guard against this scenario, where the test harness is basically ignoring the actual error and then inducing some nonsensical error in its' place. [1] http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/SimpleTest.js?rev=b78ed68af2fb#1543 [2] http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/SimpleTest.js?rev=b78ed68af2fb#1587 [3] http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/SimpleTest.js?rev=b78ed68af2fb#1018
Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → bugmail.mozilla
Attachment #8737776 -
Flags: review?(jmaher)
Comment 2•8 years ago
|
||
Comment on attachment 8737776 [details] [diff] [review] Guard against finish() being called twice Review of attachment 8737776 [details] [diff] [review]: ----------------------------------------------------------------- thanks!
Attachment #8737776 -
Flags: review?(jmaher) → review+
Assignee | ||
Updated•8 years ago
|
status-firefox46:
--- → wontfix
status-firefox47:
--- → affected
Assignee | ||
Updated•8 years ago
|
OS: Unspecified → All
Hardware: Unspecified → All
Version: Trunk → 48 Branch
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/126df4c0f1fb
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Assignee | ||
Comment 5•8 years ago
|
||
Uplifted to 47 with a=test-only https://hg.mozilla.org/releases/mozilla-aurora/rev/6ebd54f5ed82
You need to log in
before you can comment on or make changes to this bug.
Description
•