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

Side by Side Diff: LayoutTests/http/tests/security/location-href-clears-username-password.html

Issue 874393006: Clear username and password from location.href when basic HTTP (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add LayoutTests. Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/location-href-clears-username-password-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script>
5 window.onload = function()
6 {
7 if (window.testRunner)
8 {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
11 }
12
13 var div = document.getElementById('div1');
14 var frame = document.createElement('iframe');
15 frame.setAttribute('src', 'http://_username:_password@'
16 + location.host + '/security/resources/blank.html');
17 document.body.appendChild(frame);
18
19 frame.onload = function() {
20 var href = frame.contentWindow.location.href;
21 if (href.indexOf('_username') === -1 &&
22 href.indexOf('_password') === -1) {
23 alert('PASS');
24 }
25 if (window.testRunner)
26 testRunner.notifyDone();
27 }
28 }
29 </script>
30 </head>
31 <body>This test passes if it alerts the string "PASS".<br/></body>
32 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/location-href-clears-username-password-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698