Closed Bug 384192 Opened 17 years ago Closed 17 years ago

Mochitest needs to support subdomain tests

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: sicking, Assigned: Waldo)

Details

Attachments

(2 files)

We need to be able to write tests where files are located on different subdomains from each other. This is needed in order to test that setting document.domain does the right thing.
Attached patch v1Splinter Review
I've been way overthinking this problem; we don't need a proxy server.  Here's probably the shortest solution that'll work.  It'll break external resources in Mochitests when the tests are run with an existing proxy, but people shouldn't be doing that anyway.

The server changes are necessary because requests to HTTP/1.1 proxy servers use absolute paths, as a reminder.
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Attachment #270055 - Flags: review?(sayrer)
Comment on attachment 270055 [details] [diff] [review]
v1

Shifting review at sayrer's request...
Attachment #270055 - Flags: review?(sayrer) → review?(rcampbell)
Comment on attachment 270055 [details] [diff] [review]
v1

this looks reasonable to me. Sorry for the review lag.
Attachment #270055 - Flags: review?(rcampbell) → review+
Gavin's stupid browser tests broke this patch.  :-P  The |if (crossDomain)| test in quit.js is fine as long as cross-domain.js is loaded -- but it's not in browser tests, because the harness loads a different set of files that includes quit.js but not cross-domain.js.  The ensuing exception caused the test to not exit, and I suspect it finished only when test timeout code code (silently!) detected the problem.

What's in place now works for doing cross-domain stuff, so this is pretty much fixed.  However, this snafu pointed out to me that we could put the proxy stuff in the profile easily enough and not muck around inside the browser.  This also has the added benefit of not having to reproduce the list of proxied servers in two locations.  I'm going to leave this open to do that.
Double-escaping sucks.
Attachment #275359 - Flags: review?(rcampbell)
Comment on attachment 275359 [details] [diff] [review]
Move everything into runtests.pl.in

agreed
Attachment #275359 - Flags: review?(rcampbell) → review+
Comment on attachment 275359 [details] [diff] [review]
Move everything into runtests.pl.in

I suppose I need approval on this, actually...

This makes cross-domain support in Mochitests much simpler and easier to understand, and it also means harnesses don't have to each individually muck with preferences to set up the proxying.
Attachment #275359 - Flags: approval1.9?
Comment on attachment 275359 [details] [diff] [review]
Move everything into runtests.pl.in

bsmedberg granted a blanket approval for test-harness changes under the current checkin rules, over IRC.
Attachment #275359 - Flags: approval1.9?
Second version landed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
MochitestMassMove -- plz ignore.
Component: Testing → Mochitest
Product: Core → Testing
Target Milestone: mozilla1.9alpha8 → mozilla1.9
QA Contact: testing → mochitest
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: