blob: 3dd507db084adf82e15646f2863abcbfd80c4465 [file] [log] [blame]
<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
<script>
description("A cached page with a URL fragment shouldn't send the fragment in the referrer");
if (window.testRunner) {
testRunner.clearBackForwardList();
testRunner.dumpAsText();
testRunner.queueLoad('resources/success.html');
testRunner.queueBackNavigation(1);
}
const locationWithoutHash = document.location.href;
document.location = '#fragment';
window.addEventListener('pageshow', () => {
xhr = new XMLHttpRequest();
xhr.open('GET', 'resources/referrer.php', false);
xhr.send(null);
shouldBeEqualToString('xhr.responseText', locationWithoutHash);
});
</script>
</head>
<body>
</body>
<script src="../resources/js-test-post.js"></script>
</head>
</html>