Closed Bug 736521 Opened 13 years ago Closed 7 years ago

Failed resource loads should cause mochitests to fail

Categories

(Testing :: Mochitest, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ayg, Unassigned)

References

Details

In bug 735805 comment 11, I found one test that was mistakenly changed (by bug 659315) to load a nonexistent file. This should have caused it to fail. Glenn Maynard in #whatwg suggested we could use a capturing event listener here. Of course, tests need to be able to opt out somehow, because some tests will want to deliberately load nonexistent resources to test the error events and so on.
I experimented a bit with this, but error events seem not to be firing on resource load fails in mochitests the way they do for regular pages. <script src=nonexistent onerror=ok(false)></script> doesn't do anything, while such code in a regular page works fine. If this is correct, it seems like a pretty bad bug in its own right.
Okay, so it looks like this is not actually a problem for regular mochitests, because a script load error will hit window.onerror. Comment 1 was because the mochitest wasn't actually being changed when I tried to change it. Not sure what bug 735805 comment 11 was about; maybe it's only for chrome tests.
Mass closing mochitest bugs that haven't had activity in the past 5 years. Please re-open or file a new bug with modern context if this is still relevant.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.