blob: 2c68cf278e481031a050a2b0df3ed877ee047f8c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
async_test(function(t) {
if (window.internals) {
internals.setConsoleMessageListener(function() {
t.done();
});
} else {
setTimeout(function() { t.done(); }, 500);
}
let hostWithInvalidPort = "http://localhost:1";
assert_false(navigator.sendBeacon(hostWithInvalidPort, 'test'), "sendBeacon should return true");
}, "Should log an error message in the console");
</script>
</body>
</html>