
it("Should be able to add a class using #toggle", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	classList.toggle("classA");
	expect(classList.contains("classA")).to.be(true);
});

it("Should be able to remove a class using #toggle and return false when indicating class is removed", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	el.className = "classA";

	expect(classList.toggle("classA")).to.be(false);
	expect(classList.contains("classA")).to.be(false);
});

it("Should allow classes to be added using #add", function() {
	var el = document.createElement("p");
	var classList = el.classList;

	classList.add("classA");
	expect(classList.contains("classA")).to.be(true);
});

it("Should force add a class using toggle if the second argument is true", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	classList.add("classA");
	classList.toggle("classA", true);
	expect(classList.contains("classA")).to.be(true);
});

it("Should be indexable", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	el.className = "a b";

	expect(classList[0]).to.be('a');
	expect(classList[1]).to.be('b');
});

it("Should be indexable using the #item method", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	el.className = "a b";

	expect(classList.item(0)).to.be('a');
	expect(classList.item(1)).to.be('b');
});

it("Should return the length using the #length method", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	el.className = "a b";

	expect(classList.length).to.be(2);
});

it("Should remove duplicate instances of class", function() {
	var el = document.createElement("p");
	var classList = el.classList;
	el.className = "a a a";

	classList.remove("a");
	expect(classList.contains("a")).to.be(false);
	expect(el.className).to.be("");
});

@@ -1148,32 +1148,71 @@
 sName = %22a b%22;%0A%0A
+%09// for old ie%0A%09classList.toString();%0A%0A
 %09expect(classLis
@@ -1221,32 +1221,32 @@
 0%5D).to.be('a');%0A
-
 %09expect(classLis
@@ -1416,32 +1416,71 @@
 sName = %22a b%22;%0A%0A
+%09// for old ie%0A%09classList.toString();%0A%0A
 %09expect(classLis
@@ -1677,32 +1677,32 @@
 = el.classList;%0A
-
 %09el.className = 
@@ -1705,24 +1705,63 @@
 e = %22a b%22;%0A%0A
+%09// for old ie%0A%09classList.toString();%0A%0A
 %09expect(clas

Update classList tests