3 // Note that port "1" is tested by the initial load.
4 var blockedPorts
= new Array(7, 9, 11, 13, 15, 17, 19, 20,
5 21, 22, 23, 25, 37, 42, 43, 53, 77, 79, 87, 95, 101, 102,
6 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 139,
7 143, 179, 389, 465, 512, 513, 514, 515, 526, 530, 531, 532,
8 540, 556, 563, 587, 601, 636, 993, 995, 2049, 3659, 4045, 6000, 0);
10 var baseURL
= "255.255.255.255";
13 if (window
.layoutTestController
) {
14 layoutTestController
.waitUntilDone();
15 layoutTestController
.dumpResourceLoadCallbacks();
19 if (!blockedPorts
[currentPort
]) {
23 var newURL
= "http://" + baseURL
+ ":" + blockedPorts
[currentPort
] + "/test.jpg";
29 testIMG
.setAttribute("onError", "ftp21Test();");
30 var newURL
= "ftp://" + baseURL
+ "/test.jpg";
34 function ftp21Test() {
35 testIMG
.setAttribute("onError", "ftp22Test();");
36 var newURL
= "ftp://" + baseURL
+ ":21/test.jpg";
40 function ftp22Test() {
41 testIMG
.setAttribute("onError", "finishTesting();");
42 var newURL
= "ftp://" + baseURL
+ ":22/test.jpg";
46 function finishTesting() {
47 if (window
.layoutTestController
) {
48 layoutTestController
.dumpAsText();
49 setTimeout("layoutTestController.notifyDone()", 0);
54 <p>This test attempts to change the src of an IMG tag to all black listed ports to confirm that WebKit returns the
55 correct error for them - blocked instead of cannot find. It also tries the FTP ports for exemptions. Due to the
56 nature of this test, the results can only be processed automatically via DumpRenderTree
58 <img id=
"testIMG" src=
"http://255.255.255.255:1/test.jpg" onError=
"nextTest();"></img>