chromium/third_party/blink/web_tests/fast/xmlhttprequest/invalid-url.html

<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(() => {
  const xhr = new XMLHttpRequest();
  assert_throws_dom('SyntaxError', () => {
    xhr.open('GET', '//[');
  });
}, '//[');

test(() => {
  const xhr = new XMLHttpRequest();
  assert_throws_dom('SyntaxError', () => {
    xhr.open('GET', 'ftp:');
  });
}, 'Just ftp scheme');

test(() => {
  const xhr = new XMLHttpRequest();
  assert_throws_dom('SyntaxError', () => {
    xhr.open('GET', 'http:////////////');
  });
}, 'Lots of slashes');

test(() => {
  const xhr = new XMLHttpRequest();
  assert_throws_dom('SyntaxError', () => {
    xhr.open('GET', 'http://u:p@/');
  });
}, 'Credentials only authority');

test(() => {
  const xhr = new XMLHttpRequest();
  assert_throws_dom('SyntaxError', () => {
    xhr.open('GET', 'http://localhost:1291x/');
  });
}, 'Non digit in port');
</script>