Open Bug 1208791 Opened 9 years ago Updated 2 years ago

Fail mochitests that have "unreachable code after return statement"

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(Not tracked)

People

(Reporter: MattN, Unassigned)

References

Details

Attachments

(1 obsolete file)

I don't think there is a valid reason for "unreachable code after return statement" and it's usually a sign of an error/bug so we should fail tests that have this warning so we don't introduce these bugs.

17:33:36     INFO -  JavaScript warning: chrome://mochitests/content/browser/browser/base/content/test/general/browser_documentnavigation.js, line 112: unreachable code after return statement
The test here should have:

  yield ContentTask...

not return.
Attached patch Fix (obsolete) — Splinter Review
Turns out this was masking an actual bug, that can be reproduced as follows:

1. Load a page and tab to it such that the document is focused (focus ring on document)
2. Click the urlbar to focus it
3. Press Shift+F6

Actual: Nothing appears to happen.
Expected: The document is focused again.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #8667033 - Flags: review?(bugs)
Points: --- → 1
Let me put that patch in the other bug.
Attachment #8667033 - Attachment is obsolete: true
Attachment #8667033 - Flags: review?(bugs)
Assignee: enndeakin → nobody
Status: ASSIGNED → NEW
Points: 1 → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: