[url-setters.html]
  type: testharness
  [Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged.]
    expected: FAIL

  [Setting <a://example.net>.protocol = 'b']
    expected: FAIL

  [Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased]
    expected: FAIL

  [Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected]
    expected: FAIL

  [Setting <a://example.net>.protocol = '0b' No leading digit]
    expected: FAIL

  [Setting <a://example.net>.protocol = '+b' No leading punctuation]
    expected: FAIL

  [Setting <a://example.net>.protocol = 'bC0+-.']
    expected: FAIL

  [Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable]
    expected: FAIL

  [Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected]
    expected: FAIL

  [Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special. Note: this may change, see https://github.com/whatwg/url/issues/104]
    expected: FAIL

  [Setting <mailto:me@example.net>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.]
    expected: FAIL

  [Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special. Note: this may change, see https://github.com/whatwg/url/issues/104]
    expected: FAIL

  [Setting <http://:secret@example.net>.username = 'me']
    expected: FAIL

  [Setting <http://me:secret@example.net>.username = '']
    expected: FAIL

  [Setting <http://example.net>.username = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
    expected: FAIL

  [Setting <http://example.net>.password = 'secret']
    expected: FAIL

  [Setting <http://:secret@example.net>.password = '']
    expected: FAIL

  [Setting <http://example.net>.password = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
    expected: FAIL

  [Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.]
    expected: FAIL

  [Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes]
    expected: FAIL

  [Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host]
    expected: FAIL

  [Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized]
    expected: FAIL

  [Setting <http://example.net>.host = '[::0:01\]:2' IPv6 address syntax is normalized]
    expected: FAIL

  [Setting <view-source+http://example.net/path>.host = 'example.com\\stuff' \\ is not a delimiter for non-special schemes, and it’s invalid in a domain]
    expected: FAIL

  [Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error]
    expected: FAIL

  [Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though.]
    expected: FAIL

  [Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes]
    expected: FAIL

  [Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host]
    expected: FAIL

  [Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized]
    expected: FAIL

  [Setting <http://example.net>.hostname = '[::0:01\]' IPv6 address syntax is normalized]
    expected: FAIL

  [Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored]
    expected: FAIL

  [Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored]
    expected: FAIL

  [Setting <view-source+http://example.net/path>.hostname = 'example.com\\stuff' \\ is not a delimiter for non-special schemes, and it’s invalid in a domain]
    expected: FAIL

  [Setting <http://example.net:8080>.port = '' Port number is unchanged if empty in the new value. Note: this may change, see https://github.com/whatwg/url/pull/113]
    expected: FAIL

  [Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error]
    expected: FAIL

  [Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error]
    expected: FAIL

  [Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket']
    expected: FAIL

  [Setting <http://example.net/home?lang=fr#nav>.pathname = '\\a\\%2E\\b\\%2e.\\c' \\ is a segment delimiter for 'special' URLs]
    expected: FAIL

  [Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\\a\\%2E\\b\\%2e.\\c' \\ is *not* a segment delimiter for non-'special' URLs]
    expected: FAIL

  [Setting <a:/>.pathname = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.]
    expected: FAIL

  [Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, except %2E.]
    expected: FAIL

  [Setting <a:/>.search = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.]
    expected: FAIL

  [Setting <a:/>.hash = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' No percent-encoding at all (!); nuls, tabs, and newlines are removed]
    expected: FAIL

  [Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is]
    expected: FAIL

