Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test to correctly handle the fact that the 'class' attribute is global now. #2257

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions dom/nodes/getElementsByClassName-10.xml
Expand Up @@ -6,11 +6,13 @@
</head>
<body>
<div id="log"/>
<x class="a"/>
<g:x class="a"/>
<div id="tests">
<x class="a"/>
<g:x class="a"/>
</div>
<script>test(function() {
assert_array_equals(document.getElementsByClassName("a"),
document.getElementsByTagName("x"));
document.getElementById("tests").children);
})
</script>
</body>
Expand Down
16 changes: 9 additions & 7 deletions dom/nodes/getElementsByClassName-11.xml
Expand Up @@ -6,16 +6,18 @@
</head>
<body>
<div id="log" />
<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"/>
<div id="tests">
<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"/>
</div>
<script>
test(function() {
var collection = document.getElementsByClassName("a");
var test = document.getElementsByTagName("x");
assert_array_equals(collection, [test[0], test[1]]);
var test = document.getElementById("tests").children;
assert_array_equals(collection, [test[0], test[1], test[4]]);
})
</script>
</body>
Expand Down