OLD | NEW |
(Empty) | |
| 1 <script> |
| 2 if (window.testRunner) { |
| 3 testRunner.dumpAsText(); |
| 4 } |
| 5 |
| 6 // http://username@password:localhost:8000/... should be blocked. |
| 7 var originWithAuth = new URL(document.URL); |
| 8 originWithAuth.username += 'username'; |
| 9 originWithAuth.password += 'password'; |
| 10 originWithAuth = originWithAuth.href; |
| 11 |
| 12 try { |
| 13 history.pushState(null, null, originWithAuth); |
| 14 document.write("FAIL: pushState with different auth succeeded."); |
| 15 } catch(e) { |
| 16 document.write("PASS: pushState with different auth was blocked."); |
| 17 } |
| 18 </script> |
OLD | NEW |