Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-bad-port.html

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset="utf-8">
3 <title></title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script>
7
8 // list of bad ports according to
9 // https://fetch.spec.whatwg.org/#port-blocking
10 var BLOCKED_PORTS_LIST = [
11 1, // tcpmux
12 7, // echo
13 9, // discard
14 11, // systat
15 13, // daytime
16 15, // netstat
17 17, // qotd
18 19, // chargen
19 20, // ftp-data
20 21, // ftp
21 22, // ssh
22 23, // telnet
23 25, // smtp
24 37, // time
25 42, // name
26 43, // nicname
27 53, // domain
28 77, // priv-rjs
29 79, // finger
30 87, // ttylink
31 95, // supdup
32 101, // hostriame
33 102, // iso-tsap
34 103, // gppitnp
35 104, // acr-nema
36 109, // pop2
37 110, // pop3
38 111, // sunrpc
39 113, // auth
40 115, // sftp
41 117, // uucp-path
42 119, // nntp
43 123, // ntp
44 135, // loc-srv / epmap
45 139, // netbios
46 143, // imap2
47 179, // bgp
48 389, // ldap
49 465, // smtp+ssl
50 512, // print / exec
51 513, // login
52 514, // shell
53 515, // printer
54 526, // tempo
55 530, // courier
56 531, // chat
57 532, // netnews
58 540, // uucp
59 556, // remotefs
60 563, // nntp+ssl
61 587, // smtp
62 601, // syslog-conn
63 636, // ldap+ssl
64 993, // imap+ssl
65 995, // pop3+ssl
66 2049, // nfs
67 3659, // apple-sasl
68 4045, // lockd
69 6000, // x11
70 6665, // irc (alternate)
71 6666, // irc (alternate)
72 6667, // irc (default)
73 6668, // irc (alternate)
74 6669, // irc (alternate)
75 ];
76
77 BLOCKED_PORTS_LIST.map(function(a){
78 promise_test(function(t){
79 return promise_rejects(t, new TypeError(), fetch("http://example.com :" + a))
80 }, 'Request on bad port ' + a + ' should throw TypeError.');
81 });
82 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698