summaryrefslogtreecommitdiffstats
path: root/netwerk/test/unit/test_bug652761.js
blob: 030f18a1fdde50af264957e27d39ab040a1993e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This is just a crashtest for a url that is rejected at parse time (port 80,000)

"use strict";

function run_test() {
  // Bug 1301621 makes invalid ports throw
  Assert.throws(
    () => {
      NetUtil.newChannel({
        uri: "http://localhost:80000/",
        loadUsingSystemPrincipal: true,
      });
    },
    /NS_ERROR_MALFORMED_URI/,
    "invalid port"
  );

  do_test_finished();
}