blob: 61cd9b2eeb0b330fc2e4307751aad6a264614abb [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<body>
<script>
description('Tests that attribute node wrappers are not prematurely garbage collected');
var e = document.createElement('div');
document.body.appendChild(e);
e.setAttribute('id', 'd');
e.setAttribute('foo', 'bar');
a = e.getAttributeNode('foo');
a.prop = 'set';
shouldBe('a.prop', '"set"');
a = null;
e = null;
gc();
e = document.body.querySelector('div#d');
a = e.getAttributeNode('foo');
shouldBe('a.prop', '"set"');
successfullyParsed = true;
</script>