blob: 6ad40d1feacd3ad8f82355f811b29a0d1ca5c6bb [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Test that we properly handle attempts to attach an Attribute to the same node multiple times. Test passes if there is no Debug ASSERT.");
window.callback = () => {
window.callback = null;
shouldThrowErrorName("div.setAttributeNodeNS(src)", "InUseAttributeError");
frame.setAttributeNodeNS(document.createAttribute('src'));
};
let src = document.createAttribute('src');
src.value = 'javascript:parent.callback()';
let div = document.createElement('div');
let frame = document.body.appendChild(document.createElement('iframe'));
frame.setAttributeNodeNS(src);
</script>
</body>
</html>