OLD | NEW |
---|---|
1 description("This test checks the behavior of the remove() method on the select. options object."); | 1 description("This test checks the behavior of the remove() method on the select. options object."); |
2 | 2 |
3 var select1 = document.getElementById("select1"); | 3 var select1 = document.getElementById("select1"); |
4 var value; | 4 var value; |
5 | 5 |
6 debug("1.1 Remove (object) from empty Options"); | 6 debug("1.1 Remove (object) from empty Options"); |
7 value = document.createElement("DIV"); | 7 value = document.createElement("DIV"); |
8 shouldBe("select1.options.remove(value)", "undefined"); | 8 shouldBe("select1.options.remove(value)", "undefined"); |
9 shouldBe("select1.options.length", "0"); | 9 shouldBe("select1.options.length", "0"); |
10 shouldBe("select1.selectedIndex", "-1"); | 10 shouldBe("select1.selectedIndex", "-1"); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 shouldBe("select2.options.length", "3"); | 233 shouldBe("select2.options.length", "3"); |
234 shouldBe("select2.selectedIndex", "1"); | 234 shouldBe("select2.selectedIndex", "1"); |
235 shouldBe("select2.options[1].value", "'O'"); | 235 shouldBe("select2.options[1].value", "'O'"); |
236 debug(""); | 236 debug(""); |
237 | 237 |
238 debug("2.17 Detach select element"); | 238 debug("2.17 Detach select element"); |
239 shouldNotBe("select2.parentNode", "null"); | 239 shouldNotBe("select2.parentNode", "null"); |
240 shouldBe("select2.remove()", "undefined"); | 240 shouldBe("select2.remove()", "undefined"); |
241 shouldBeNull("select2.parentNode"); | 241 shouldBeNull("select2.parentNode"); |
242 debug(""); | 242 debug(""); |
243 | |
244 debug("2.18 Remove index -2147483649 from non-empty Options"); | |
245 shouldBe("select2.options.remove(-2147483649)", "undefined"); | |
philipj_slow
2015/06/29 09:33:05
Checking the return value of remove() doesn't seem
shiva.jm
2015/06/30 05:33:23
Done.
| |
246 debug(""); | |
247 | |
248 debug("2.19 Remove index -2147483648 from non-empty Options"); | |
249 shouldBe("select2.options.remove(-2147483648)", "undefined"); | |
250 debug(""); | |
251 | |
252 debug("2.20 Remove index -2147483647 from non-empty Options"); | |
253 shouldBe("select2.options.remove(-2147483647)", "undefined"); | |
254 debug(""); | |
255 | |
256 debug("2.21 Remove index 2147483649 from non-empty Options"); | |
257 shouldBe("select2.options.remove(2147483649)", "undefined"); | |
258 debug(""); | |
259 | |
260 debug("2.22 Remove index 2147483648 from non-empty Options"); | |
261 shouldBe("select2.options.remove(2147483648)", "undefined"); | |
262 debug(""); | |
263 | |
264 debug("2.23 Remove index 2147483647 from non-empty Options"); | |
265 shouldBe("select2.options.remove(2147483647)", "undefined"); | |
266 debug(""); | |
OLD | NEW |