Skip to content

Commit

Permalink
Mark WPT tests as FAIL due to lack of DOMTokenList.toggle
Browse files Browse the repository at this point in the history
For now, these tests are being handled in test_element_classList.html
until DOMTokenList.toggle gets implemented.

Created issue #3138 to track DOMTokenList.toggle implementation.
  • Loading branch information
brunoabinader committed Aug 25, 2014
1 parent 400a314 commit 23d1d1c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/content/test_element_classList.html
@@ -0,0 +1,21 @@
<!-- Remove this and update WPT metadata once DOMTokenList.toggle (#3138) is implemented. -->
<!DOCTYPE html>
<html>
<head>
<script src="harness.js"></script>
<script>
let div = document.createElement("div");
div.className = "foo bar";

let classList = div.classList;
div.className = "";

is(classList.item(0), null, "classList.item(0) must return null when all classes have been removed");
is(classList[0], undefined, "classList[0] must be undefined when all classes have been removed");

finish();
</script>
</head>
<body>
</body>
</html>
6 changes: 6 additions & 0 deletions src/test/wpt/metadata/dom/nodes/Element-classlist.html.ini
Expand Up @@ -102,6 +102,12 @@
[classList must stringify to an empty string when all classes have been removed]
expected: FAIL

[classList.item(0) must return null when all classes have been removed]
expected: FAIL

[classList[0\] must be undefined when all classes have been removed]
expected: FAIL

[classList.add should treat " " as a space]
expected: FAIL

Expand Down

0 comments on commit 23d1d1c

Please sign in to comment.