blob: 2d144f80e70c1efc600c0cca703b5073ba7eed6d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Tests the DOM bindings for the ping attribute');
var anchor = document.createElement('a');
shouldBeEqualToString('anchor.ping', '');
anchor.setAttribute('ping', 'p1');
shouldBeEqualToString('anchor.ping', 'p1');
anchor.ping = 'p2';
shouldBeEqualToString('anchor.getAttribute("ping")', 'p2');
anchor.ping = null;
shouldBeTrue('anchor.hasAttribute("ping")');
shouldBeEqualToString('anchor.ping', 'null');
var area = document.createElement('area');
shouldBeEqualToString('area.ping', '');
area.setAttribute('ping', 'p1');
shouldBeEqualToString('area.ping', 'p1');
area.ping = 'p2';
shouldBeEqualToString('area.getAttribute("ping")', 'p2');
area.ping = null;
shouldBeTrue('area.hasAttribute("ping")');
shouldBeEqualToString('area.ping', 'null');
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>