Re: [url-tests] Add tests for URL setters (#2830)

Re undefined comment and shadowing `attr`: done.

The `url.port = ""` case is also a deliberate spec deviation per https://github.com/whatwg/url/pull/113. I’ve marked it as such. But maybe it’s better for this PR to not include any spec deviation, and update tests later if the spec changes?

Re exceptions, none of the setters (except `href` which is not tested here) throw per https://url.spec.whatwg.org/#api if I’m reading correctly. (Compare "If parsedURL is failure, throw a TypeError exception." in the `href` setter v.s. the lack of such a step in other setters, meaning a parser failure there is silently ignored.) So an implementation throwing *should* make the test fail. (Unless of course the spec is wrong and needs to be changed.)


View on GitHub: https://github.com/w3c/web-platform-tests/pull/2830#issuecomment-210698473

Received on Saturday, 16 April 2016 00:40:57 UTC