blob: beaa3a3931836aa149a9c5e6a5ce214ee3499ede [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/util.js"></script>
</head>
<body onload="setTimeout('runTest()', 100)">
<div id="description">Non-user initiated, delayed cross-site navigations done client-side should be detected as top frame redirects by ITP.</div>
<div id="output"></div>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
const navigationEndOrigin = "http://localhost:8000";
const navigationStartOrigin = "http://127.0.0.1:8000";
function navigateCrossSite() {
document.location.href = navigationEndOrigin + "/resourceLoadStatistics/log-delayed-client-side-redirects.html?dummyParam=" + Math.random();
}
function runTest() {
if (document.location.origin === navigationStartOrigin) {
testRunner.setUseITPDatabase(true);
setEnableFeature(true, navigateCrossSite);
} else {
testRunner.dumpResourceLoadStatistics();
setEnableFeature(false, function () {
testRunner.notifyDone();
});
}
}
</script>
</body>
</html>