chromium/third_party/blink/web_tests/http/tests/navigation/ping-same-origin.html

<html><head>
<title>Ping</title>
<script>

var testCalled = false;

function test() {
    if (!testCalled) {
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.overridePreference("WebKitHyperlinkAuditingEnabled", 1);
            testRunner.waitUntilDone();
            testRunner.dumpPingLoaderCallbacks();
        }
        testCalled = true;
        return;
    }

    if (window.eventSender) {
        var a = document.getElementById("a");
        eventSender.mouseMoveTo(a.offsetLeft + 2, a.offsetTop + 2);
        eventSender.mouseDown();
        eventSender.mouseUp();
    }
}

</script>
</head>
<body onload="test();">
<img src="resources/delete-ping.php?test=same-origin" onload="test();" onerror="test();"></img>
<a id="a" href="resources/check-ping.php?test=same-origin" ping="resources/save-Ping.php?test=same-origin">Navigate and send ping</a>
</body></html>