blob: 95e9d9ef30d8aea756b391094b493958267b1e30 [file] [log] [blame]
<!DOCTYPE html>
<body>
<form>
<input name="radios" type="radio">
<input name="radios" type="radio">
</form>
<script src="../../../resources/js-test.js"></script>
<script>
var nodeListKind = {
ChildNodeListType: 'document.body.childNodes',
ClassNodeListType: 'document.getElementsByClassName("class")',
NameNodeListType: 'document.getElementsByName("name")',
TagNodeListType: 'document.getElementsByTagName("body")',
RadioNodeListType: 'document.querySelector("form").elements["radios"]',
LabelsNodeListType: 'document.querySelector("input").labels',
};
var i = 1;
for (var kind in nodeListKind) {
var code = nodeListKind[kind];
// Do initialization work in an inner function to avoid references to
// objects remaining live on this function's stack frame
// (http://crbug.com/595672/).
(() => {eval(code).customProperty = i})();
gc();
shouldBe(code + '.customProperty', '' + i++);
}
</script>
</body>