blob: 31a7decc01dcc88676193dca3b39b37ad36be14e [file] [log] [blame]
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @description document.getElementsByClassName(): "tricky" compound
import "dart:html";
import "../../../testcommon.dart";
main() {
var doc = new DomParser().parseFromString('''
<html xmlns="" xmlns:g="" xmlns:h="" xmlns:t="">
<x class="a"/>
<g:x class="a"/>
<x t:class="a" h:class="a" g:class="a"/>
<g:x t:class="a" h:class="a" g:class="a"/>
<t:x class="a" t:class="a" h:class="a" g:class="a"/>
''', 'text/xml');
var collection = doc.getElementsByClassName("a"),
test = doc.getElementsByTagName("x");
shouldBeList(collection, [test[0], test[1]]);