waitForExplicitFinish doesn't actually wait for a finish if the test throws after this

RESOLVED INVALID

Status

Testing
Mochitest
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: Away for a while, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
If I modify one of my mochitests to just do the following, I get the output below:

SimpleTest.waitForExplicitFinish();
throw 1;

 0:20.04 152 INFO TEST-START | /tests/content/media/webaudio/test/test_audioParamSetCurveAtTime.html
 0:20.27 ++DOMWINDOW == 27 (0x110b078b0) [serial = 42] [outer = 0x124db7cb0]
 0:20.43 153 ERROR TEST-UNEXPECTED-FAIL | /tests/content/media/webaudio/test/test_audioParamSetCurveAtTime.html | uncaught exception - uncaught exception: 1 at :0
 0:20.43 JavaScript error: , line 0: uncaught exception: 1
 0:20.52 154 INFO TEST-END | /tests/content/media/webaudio/test/test_audioParamSetCurveAtTime.html | finished in 478ms

I don't think this is expected.
Er, I think we treat all unhandled exceptions as test failures and terminate the test. You can use SimpleTest.expectUncaughtException to explicitly handle an uncaught exception. I think this is probably INVALID.
(Reporter)

Comment 2

5 years ago
What do you mean probably?  ;-)

You're right, my bad.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.