<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>

<foo id="a"></foo>
<div id="b" class="foo"></div>

<script>
description("Checks that getElementsByClassName('foo') and getElementsByTagName('foo') do not conflict");

var withFooTag = document.getElementsByTagName("foo");
shouldBe("withFooTag.length", "1");
shouldBeEqualToString("withFooTag[0].id", "a");

var withFooClass = document.getElementsByClassName("foo");
shouldBe("withFooClass.length", "1");
shouldBeEqualToString("withFooClass[0].id", "b");
</script>
