chromium/third_party/blink/web_tests/fast/dom/htmlallcollection-name.html

<!DOCTYPE html>
<head>
<meta name="meta">
</head>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>

<a name="a">anchor</a>
<applet name="applet"></applet>
<button name="button">Button</button>
<embed name="embed"></embed>
<form name="form"></form>
<iframe name="iframe"></iframe>
<img name="img">
<input name="input">
<map name="map"><area name="area"></area></map>
<object name="object"></object>
<select name="select" style="visibility:hidden"></select>
<textarea name="textarea"></textarea>

<option name="option"></option>
<output name="output"></output>

<script>
test(() => { assert_true(!!document.all.a); }, '<a> should be found.');
test(() => { assert_true(!!document.all.button); }, '<button> should be found.');
test(() => { assert_true(!!document.all.embed); }, '<embed> should be found.');
test(() => { assert_true(!!document.all.form); }, '<form> should be found.');
test(() => { assert_true(!!document.all.iframe); }, '<iframe> should be found.');
test(() => { assert_true(!!document.all.img); }, '<img> should be found.');
test(() => { assert_true(!!document.all.input); }, '<input> should be found.');
test(() => { assert_true(!!document.all.map); }, '<map> should be found.');
test(() => { assert_true(!!document.all.meta); }, '<meta> should be found.');
test(() => { assert_true(!!document.all.object); }, '<object> should be found.');
test(() => { assert_true(!!document.all.select); }, '<select> should be found.');
test(() => { assert_true(!!document.all.textarea); }, '<textarea> should be found.');

test(() => { assert_equals(document.all.area, undefined); }, '<area> should not be found.');
test(() => { assert_equals(document.all.option, undefined); }, '<option> should not be found.');
test(() => { assert_equals(document.all.output, undefined); }, '<output> should not be found.');
test(() => { assert_equals(document.all.applet, undefined); }, '<applet> should not be found.');

document.documentElement.innerHTML = '<frameset name="frameset"><frame name="frame"></frame></frameset>';
test(() => { assert_true(!!document.all.frame); }, '<frame> should be found.');
test(() => { assert_true(!!document.all.frameset); }, '<frameset> should be found.');

</script>
</body>