1 <body> 2 <p>Test that appcache works with authentication. Should say SUCCESS:</p> 3 <script> 4 if (window.layoutTestController) { 5 layoutTestController.dumpAsText(); 6 layoutTestController.waitUntilDone(); 7 } 8 9 // Store authentication credentials. 10 var req = new XMLHttpRequest; 11 req.open("GET", "resources/auth/setup.php", false, "login", "pasword"); 12 req.send(); 13 14 var ifr = document.createElement("iframe"); 15 ifr.setAttribute("src", "resources/auth/iframe.php"); 16 document.body.appendChild(ifr); 17 18 function success() 19 { 20 var text = document.createElement("p"); 21 text.appendChild(document.createTextNode("SUCCESS")); 22 document.body.replaceChild(text, document.getElementsByTagName("iframe")[0]); 23 24 if (window.layoutTestController) 25 layoutTestController.notifyDone(); 26 } 27 </script> 28 </body> 29