web-platform-tests / rfcs

web-platform-tests RFCs
75 stars 63 forks source link

Consider adding a `.www` file name flag. #39

Closed mikewest closed 3 years ago

mikewest commented 4 years ago

It would be simpler to write tests for features that rely on interaction between subdomains in a site if the top-level document could be loaded from a domain other than the web-platform.test apex.

Addresses web-platform-tests/wpt#20932

jgraham commented 4 years ago

Generally this seems reasonable.

I wonder if people are going to expect other subdomains to work as well. I'm hoping that there isn't a use case for more than one sub domain for the top level test (although I suspect there will be uses for e.g. www.www.web-platform.test) in which case the RFC should propose adding a lint to ensure that people don't use those subdomains in the test name.

mikewest commented 4 years ago

Do you have a draft implementation to get some confidence there's nothing unwieldy about this in practice?

No. I was imagining it would just follow along with whatever we're doing to generate the URL for .https, but I couldn't quickly figure out how to determine what the subdomain that would be generated for {{domains[www]}} would be at the point that we need it. I'm just not familiar enough with WPT internals. :(

Hexcles commented 4 years ago

cc @npm1 (I forgot if I told you about this: it'd satisfy your use case of specifying which origin a test should run in)

stephenmcgruer commented 4 years ago

This RFC has two approvals, and no clear outstanding questions aside from implementation complexity (where @mikewest deferred due to not knowing enough about WPT internals).

I'd like to start the 1-week no-objections clock, but am concerned that we may end up with an RFC that is accepted but the actual implementation work never happens (if this doesn't have someone willing to implement it). Thoughts, @web-platform-tests/wpt-core-team ?

sideshowbarker commented 4 years ago

I agree that we have a problem if nobody is committed to working on implementing this. But I don’t have any novel suggestions about how to solve that problem.

That said, I would think it could be helpful to go ahead with getting the RFC accepted first. At that point it’s clear at least that nobody has objected to the identified need. And that would at least not be harmful to the goal of getting somebody to work on actually implementing it.

mikewest commented 4 years ago

If this is something y'all can accept, I can try to hack an implementation together. I suspect I will need help. :)

stephenmcgruer commented 4 years ago

If this is something y'all can accept, I can try to hack an implementation together. I suspect I will need help. :)

Sorry, I dropped the ball here. I think this is definitely something we can accept; the RFC has approvals and no concerns. I think if you can produce a prototype PR we will happily merge this RFC.

miketaylr commented 3 years ago

I think if you can produce a prototype PR we will happily merge this RFC.

FYI: I have a prototype PR in https://github.com/web-platform-tests/wpt/pull/26263

stephenmcgruer commented 3 years ago

Landing since (wayyyy) more than 7 days have passed, and the prototype looks pretty good (can work out any minor problems in review).