<!DOCTYPE html>
<html>
<body>
<script src="/js-test-resources/js-test.js"></script>
<script src="/js-test-resources/ui-helper.js"></script>
<script>
description("Tests that user interaction is always logged for the top document/frame.");
jsTestIsAsync = true;

const topFrameOrigin = "http://127.0.0.1:8000";
const subFrameOrigin = "http://localhost:8000";

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);
}

function finishTest() {
    shouldBeTrue("testRunner.isStatisticsHasHadUserInteraction(topFrameOrigin)");
    shouldBeFalse("testRunner.isStatisticsHasHadUserInteraction(subFrameOrigin)");

    finishJSTest();
}

onload = function() {
    if (internals)
        internals.setResourceLoadStatisticsEnabled(true);

    if (testRunner) {
        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
    }

    shouldBe("document.location.origin", "topFrameOrigin");

    if (testRunner) {
        shouldBeFalse("testRunner.isStatisticsHasHadUserInteraction(topFrameOrigin)");
        shouldBeFalse("testRunner.isStatisticsHasHadUserInteraction(subFrameOrigin)");

        activateElement("testFrame");
    }
};
</script>
<iframe id="testFrame" src="http://localhost:8000/resourceLoadStatistics/resources/dummy.html"></iframe>
</body>
</html>