blob: df8de18f2a418e0d98f345cffbee57f1ff3e1b42 [file] [edit]
<head>
<script>
if (window.testRunner && window.internals) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
}
async function clickOnLinkWithPing() {
if (window.eventSender) {
var a = document.getElementById("a");
var x = a.offsetLeft + 2;
var y = a.offsetTop + 2;
await eventSender.asyncMouseMoveTo(x, y);
await eventSender.asyncMouseDown();
await eventSender.asyncMouseUp();
}
}
function showPingResult() {
var iframe = document.getElementById("result_frame");
iframe.onload = function() {
if (window.testRunner) { testRunner.notifyDone(); }
}
iframe.src = "resources/get-ping-data.py?test=contentextensions-hide-on-ping";
}
</script>
</head>
<body>
This test follows a link with a ping attribute where the ping URL matches a 'css-display-none' rule.
<div class="foo">This text should be hidden once the ping is sent.</div>
<div class="bar">This text should remain visible.</div>
<div>
<img src="resources/delete-ping.py?test=contentextensions-hide-on-ping" onerror="clickOnLinkWithPing();">
<a id="a" href="#a" ping="resources/save-ping.py?test=contentextensions-hide-on-ping" onclick="showPingResult();">Link with ping</a>
</div>
<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
</body>