Closed Bug 1254118 Opened 9 years ago Closed 9 years ago

Web protocol handlers need more testing coverage

Categories

(Firefox :: File Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 48
Tracking Status
firefox47 --- affected
firefox48 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

Web protocol handlers have a few different tests that each focus on a subset of the feature: - browser/base/content/test/general/browser_registerProtocolHandler_notification.js (checks that the notification bar is correctly displayed) - browser/components/feeds/test/test_registerHandler.html (checks the error handling of navigator.registerProtocolHandler) - uriloader/exthandler/tests/mochitest/test_handlerApps.xhtml (checks the nsIWebHandlerApp implementation) But unfortunately none of these tests cover the feature as a whole. I think if such a test had existed, we would have caught bug 1253307 when bug 1116478 was being fixed. On a slightly different but related topic: I started looking into this because I was trying to enable test_handlerApps.xhtml for e10s. It turns out the code exercised by this test, under normal circumstances, will only ever run in the chrome process, so running this with e10s doesn't make sense. Should this test be converted to a mochitest-chrome test, or be left as is and marked as 'ignore' in our e10s test list?
Here is a browser-chrome test that, I think would have caught bug 1253307, and covers the feature as a whole. I included different code paths with todo() calls for the things that currently fail with e10s due to bug 1253307, so that waiting for a fix there doesn't stop us from increasing test coverage. Felipe, could you please also answer the last question from the bug description?
Attachment #8727399 - Flags: review?(felipc)
Comment on attachment 8727399 [details] [diff] [review] browser-chrome test Review of attachment 8727399 [details] [diff] [review]: ----------------------------------------------------------------- One drive-by comment (since I'm working on bug 1253307). ::: uriloader/exthandler/tests/mochitest/browser_web_protocol_handlers.js @@ +22,5 @@ > + }, 100); > + var moveOn = function() { clearInterval(interval); nextTest(); }; > +} > + > +function promiseWaitForCondition(aConditionFn) { For this you can probably use BrowserTestUtils.waitForCondition.
Comment on attachment 8727399 [details] [diff] [review] browser-chrome test Review of attachment 8727399 [details] [diff] [review]: ----------------------------------------------------------------- yeah, r+ with BTU.waitForCondition. On your question in comment 0, you can just mark as Ignore with an appropriate comment in the spreadsheet. After the whole test effort is done we'll work towards appropriately annotating non-e10s-only tests in order to prepare for a future where we only run M-e10s (and create a new suite to keep running these non e10s tests)
Attachment #8727399 - Flags: review?(felipc) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: