blob: 44c95610625c13044343237e504b19249c150550 [file] [log] [blame]
<!-- webkit-test-runner [ useFlexibleViewport=true useEphemeralSession=true ] -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script src="/js-test-resources/ui-helper.js"></script>
<script src="resources/util.js"></script>
</head>
<body onload="setTimeout(runTest, 0)">
<div id="description">Tests that storage of private click measurement is disabled in ephemeral sessions.</div>
<a id="targetLink" href="http://localhost:8000/privateClickMeasurement/store-disabled-in-ephemeral-session.html?stepTwo" attributionsourceid="3" attributiondestination="http://localhost:8000">Link</a><br>
<div id="output"></div>
<script>
prepareTest();
function activateElement(elementID) {
var element = document.getElementById(elementID);
var centerX = element.offsetLeft + element.offsetWidth / 2;
var centerY = element.offsetTop + element.offsetHeight / 2;
UIHelper.activateAt(centerX, centerY).then(
function () {
},
function () {
document.getElementById("output").innerText = "FAIL Promise rejected.";
tearDownAndFinish();
}
);
}
function runTest() {
if (window.testRunner) {
if (window.location.search === "?stepTwo") {
testRunner.dumpPrivateClickMeasurement();
document.body.removeChild(document.getElementById("targetLink"));
tearDownAndFinish();
} else {
activateElement("targetLink");
}
} else {
document.getElementById("output").innerText = "FAIL No testRunner.";
}
}
</script>
</body>
</html>