Need way to run mochitests from file://

REOPENED
Unassigned

Status

Testing
Mochitest
REOPENED
10 years ago
15 days ago

People

(Reporter: bz, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Need this to test bug 418356 and bug 402983.  This can be gotten around by using UniversalXPConnect to create/remove the files (in /tmp, say) as part of an http:// test, but that makes the test a lot more confusing.  Ideally we would just have a directory tree running as file:// somewhere and we could point to a particular file in the tree as the testcase.  It's important that it be possible to have the "main" testcase _not_ be at the top of the tree, so we can test accessing ancestors.

Updated

10 years ago
Blocks: 418391

Updated

10 years ago
Duplicate of this bug: 372307

Comment 3

9 years ago
Moving a bunch of Core :: Testing bugs to Testing :: Mochitest to clear out the former, which is obsolete now that we have more specialized categories for such bugs; filter on the string "MochitestMmMm" to delete all these notifications.
Component: Testing → Mochitest
Product: Core → Testing
QA Contact: testing → mochitest
Version: Trunk → unspecified
Created attachment 353455 [details] [diff] [review]
non-working proposal

Here's a proposal that would just add file:// tests into the current test runner. Of course, it doesn't work, because http:// content can't link to file:// content, so you get "Error: uncaught exception: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "http://localhost:8888/tests/SimpleTest/TestRunner.js Line: 92"]"

The patch works by just requiring the file tests to be named "test_file_...".

I'm going to file a Caps bug blocking this one to see if we can make that work. If not, the alternative would be to add a whole new method to runtests.py, like --file, which would load the whole harness from a file:// URL.

Updated

9 years ago
Depends on: 470016
Blocks: 507361
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
Last Resolved: 15 days ago
Resolution: --- → WONTFIX
This is still relevant.  We need it to be able to write tests for critical security code.  The fact that we haven't bothered to fix the harness to make this possible doesn't mean it doesn't actually need to happen...
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
You need to log in before you can comment on or make changes to this bug.