summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/syntax/parsing/Document.getElementsByTagName-foreign-02.html
blob: 1109a24cfee1721b7597b1e7797d7f61be945ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!doctype html>
<title>getElementsByTagName and font</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-getelementsbytagname">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="test">
<font></font>
<svg><font/></svg>
</div>
<script>
var HTML = "http://www.w3.org/1999/xhtml", SVG = "http://www.w3.org/2000/svg";
test(function() {
  assert_equals(document.getElementsByTagName("FONT").length, 1);
  assert_equals(document.getElementsByTagName("FONT")[0].namespaceURI, HTML);
}, "Upper-case font")
test(function() {
  assert_equals(document.getElementsByTagName("font").length, 2);
  assert_equals(document.getElementsByTagName("font")[0].namespaceURI, HTML);
  assert_equals(document.getElementsByTagName("font")[1].namespaceURI, SVG);
}, "Lower-case font")
</script>