| Index: LayoutTests/fast/loader/stateobjects/replacestate-base-illegal.html
|
| ===================================================================
|
| --- LayoutTests/fast/loader/stateobjects/replacestate-base-illegal.html (revision 0)
|
| +++ LayoutTests/fast/loader/stateobjects/replacestate-base-illegal.html (revision 55463)
|
| @@ -0,0 +1,26 @@
|
| +<html>
|
| +<head>
|
| +<base href="https://www.test.com/">
|
| +<script>
|
| +if (window.layoutTestController)
|
| + layoutTestController.dumpAsText();
|
| +
|
| +window.onload = function(){
|
| + var msg;
|
| + try {
|
| + window.history.replaceState({}, {}, 'https://www.test.com/');
|
| + msg = document.createTextNode("FAIL: URL bar was changed.");
|
| + } catch (e) {
|
| + if (e.code == 18)
|
| + msg = document.createTextNode("PASS: Security exception thrown.");
|
| + else
|
| + msg = document.createTextNode("FAIL: Unknown exception thrown.");
|
| + }
|
| + document.body.appendChild(msg);
|
| +};
|
| +</script>
|
| +</head>
|
| +<body>
|
| +<p>This page should trigger an error on attempting to set the URL bar to https://www.test.com/</p>
|
| +</body>
|
| +</html>
|
|
|