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

Side by Side Diff: webkit/data/layout_tests/pending/security/block-test.html

Issue 62120: For two layout tests that were split into pieces to allow us to pass most of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <script>
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, 4045, 6000, 0);
9
10 var baseURL = "255.255.255.255";
11 var currentPort = 0;
12
13 if (window.layoutTestController) {
14 layoutTestController.waitUntilDone();
15 layoutTestController.dumpResourceLoadCallbacks();
16 }
17
18 function nextTest() {
19 if (!blockedPorts[currentPort]) {
20 ftpTest();
21 return;
22 }
23 var newURL = "http://" + baseURL + ":" + blockedPorts[currentPort] + "/t est.jpg";
24 currentPort++;
25 testIMG.src = newURL;
26 }
27
28 function ftpTest() {
29 testIMG.setAttribute("onError", "ftp21Test();");
30 var newURL = "ftp://" + baseURL + "/test.jpg";
31 testIMG.src = newURL;
32 }
33
34 function ftp21Test() {
35 testIMG.setAttribute("onError", "ftp22Test();");
36 var newURL = "ftp://" + baseURL + ":21/test.jpg";
37 testIMG.src = newURL;
38 }
39
40 function ftp22Test() {
41 testIMG.setAttribute("onError", "finishTesting();");
42 var newURL = "ftp://" + baseURL + ":22/test.jpg";
43 testIMG.src = newURL;
44 }
45
46 function finishTesting() {
47 if (window.layoutTestController) {
48 layoutTestController.dumpAsText();
49 setTimeout("layoutTestController.notifyDone()", 0);
50 }
51 }
52 </script>
53 <body>
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 DumpRen derTree
57 </p>
58 <img id="testIMG" src="http://255.255.255.255:1/test.jpg" onError="nextTest();"> </img>
59 </body>
60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698