blob: aabcf0cea0a80e3216bce95557ec060158a12943 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description('Test getting the port attribute of the URL in HTMLAnchorElement.');
var a = document.createElement('a');
debug("Default port is empty");
shouldBe("a.port", "''");
debug("Unspecified port should return empty string");
a.href = "http://example.com/";
shouldBe("a.port", "''");
debug("Empty port should be empty");
a.href = "http://example.com:/";
shouldBe("a.port", "''");
</script>
</body>
</html>