diff options
Diffstat (limited to 'LayoutTests/http/tests/appcache/auth.html')
-rw-r--r-- | LayoutTests/http/tests/appcache/auth.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/appcache/auth.html b/LayoutTests/http/tests/appcache/auth.html new file mode 100644 index 0000000..27b0ba6 --- /dev/null +++ b/LayoutTests/http/tests/appcache/auth.html @@ -0,0 +1,28 @@ +<body> +<p>Test that appcache works with authentication. Should say SUCCESS:</p> +<script> +if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); +} + +// Store authentication credentials. +var req = new XMLHttpRequest; +req.open("GET", "resources/auth/setup.php", false, "login", "pasword"); +req.send(); + +var ifr = document.createElement("iframe"); +ifr.setAttribute("src", "resources/auth/iframe.php"); +document.body.appendChild(ifr); + +function success() +{ + var text = document.createElement("p"); + text.appendChild(document.createTextNode("SUCCESS")); + document.body.replaceChild(text, document.getElementsByTagName("iframe")[0]); + + if (window.layoutTestController) + layoutTestController.notifyDone(); +} +</script> +</body> |