blob: 2bcc6edc8f511b5c068bca1f7e1704ff9bfb11d0 [file] [log] [blame]
<!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>