<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>

<div style="display:none">
    <div>text1</div><div id='Symbol(div)'>text2</div>
    <img><img id="img"><img id="Symbol(img)">
    <form><input><input name="input"><input name="Symbol(input)"></form>
</div>
    
<script>
description('This tests Symbol property names with a number of named items collections.');

var getElementsByTagNameList = document.getElementsByTagName('div');
debug(String(getElementsByTagNameList));
shouldBeTrue("getElementsByTagNameList.length === 4");
shouldBeTrue("getElementsByTagNameList[Symbol()] === undefined");
shouldBeTrue("getElementsByTagNameList[Symbol('div')] === undefined");
shouldBeTrue("getElementsByTagNameList['Symbol(div)'] instanceof HTMLDivElement");

debug("\n" + String(window));
shouldBeTrue("window[Symbol()] === undefined");
shouldBeTrue("window[Symbol('div')] === undefined");
shouldBeTrue("window['Symbol(div)'] instanceof HTMLDivElement");

debug("\n" + String(document.images));
shouldBeTrue("document.images.length === 3");
shouldBeTrue("document.images[Symbol()] === undefined");
shouldBeTrue("document.images[Symbol('img')] === undefined");
shouldBeTrue("document.images['Symbol(img)'] instanceof HTMLImageElement");

debug("\n" + String(document.all));
shouldBeTrue("document.all.length > 10");
shouldBeTrue("document.all[Symbol()] === undefined");
shouldBeTrue("document.all[Symbol('div')] === undefined");
shouldBeTrue("document.all['Symbol(div)'] instanceof HTMLDivElement");

debug("\n" + String(document.forms));
shouldBeTrue("document.forms[Symbol()] === undefined");

debug("\n" + String(document.forms[0]));
shouldBeTrue("document.forms[0][Symbol()] === undefined");
shouldBeTrue("document.forms[0][Symbol('input')] === undefined");
shouldBeTrue("document.forms[0]['Symbol(input)'] instanceof HTMLInputElement");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
