Index: LayoutTests/http/tests/security/location-href-clears-username-password.html |
diff --git a/LayoutTests/http/tests/security/location-href-clears-username-password.html b/LayoutTests/http/tests/security/location-href-clears-username-password.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..74f7decd88dabe26e7c47cf0c0cdc99c1b5ae3d7 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/location-href-clears-username-password.html |
@@ -0,0 +1,32 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<head> |
+<script> |
+window.onload = function() |
+{ |
+ if (window.testRunner) |
+ { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ var div = document.getElementById('div1'); |
+ var frame = document.createElement('iframe'); |
+ frame.setAttribute('src', 'http://_username:_password@' |
+ + location.host + '/security/resources/blank.html'); |
+ document.body.appendChild(frame); |
+ |
+ frame.onload = function() { |
+ var href = frame.contentWindow.location.href; |
+ if (href.indexOf('_username') === -1 && |
+ href.indexOf('_password') === -1) { |
+ alert('PASS'); |
+ } |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ } |
+} |
+</script> |
+</head> |
+<body>This test passes if it alerts the string "PASS".<br/></body> |
+</html> |