Consider the following test:
u = new URL("https://github.com/whatwg/url/issues/new");
u.protocol = "ht\ntp";
u.href
On Chrome, Firefox, and Safari, u.href retains the original https protocol. This behavior as it relates to the Location object is in fact tested by WPT(!): search for \x0A in html/browsers/history/the-location-interface/location-protocol-setter.html.