blob: cde03f7299d8e0019399a72e95d40a12073e7752 [file] [log] [blame]
<!DOCTYPE html>
<head>
<script src="../resources/js-test-pre.js"></script>
<script src="/resourceLoadStatistics/resources/util.js"></script>
</head>
<body onload="runTest()">
<script>
description('Ensure web socket loads are reported as loaded third party domains.');
window.jsTestIsAsync = true;
if (window.testRunner)
testRunner.setAllowsAnySSLCertificate(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);
});
}
function runTest() {
new WebSocket('ws://localhost:8880/websocket/tests/hybi/simple');
setTimeout(askForLoadedThirdPartyDomains, 0);
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>