blob: a8b087e89e9caf35da0ccecdf35871995dc16a35 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script src="/js-test-resources/ui-helper.js"></script>
<script src="/resourceLoadStatistics/resources/util.js"></script>
<script>
description("Tests that a iframe gets reported as a loaded third party domain.");
jsTestIsAsync = true;
function askForLoadedThirdPartyDomains() {
testRunner.loadedThirdPartyDomains(function (arrayOfDomains) {
if (arrayOfDomains.length == 0) {
askForLoadedThirdPartyDomains();
return;
}
if (arrayOfDomains.includes("localhost"))
testPassed("Loaded domain was successfully captured.");
else
testFailed("Loaded domain was not successfully captured.");
setEnableFeature(false, finishJSTest);
});
}
</script>
</head>
<body>
<iframe onload='askForLoadedThirdPartyDomains()' src="http://localhost:8000/resourceLoadStatistics/resources/basic-iframe.html">
</iframe>
</body>
</html>