mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
Update web-platform-tests to revision 4d96cccabc2feacd48e1dab9afc22b8af2225572
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTMLTableRowElement#deleteCell</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com/">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<table>
|
||||
<tr id="testTr">
|
||||
<td>ABCDE</td>
|
||||
<td>12345</td>
|
||||
<td>ABC12</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
|
||||
var tr = document.getElementById("testTr");
|
||||
|
||||
test(function () {
|
||||
tr.deleteCell(0);
|
||||
assert_equals(tr.cells[0].innerHTML, "12345");
|
||||
assert_equals(tr.cells.length, 2);
|
||||
}, "HTMLTableRowElement deleteCell(0)");
|
||||
|
||||
test(function () {
|
||||
tr.deleteCell(-1);
|
||||
assert_equals(tr.cells[tr.cells.length - 1].innerHTML, "12345");
|
||||
assert_equals(tr.cells.length, 1);
|
||||
}, "HTMLTableRowElement deleteCell(-1)");
|
||||
|
||||
test(function () {
|
||||
assert_throws("IndexSizeError", function () {
|
||||
tr.deleteCell(-2);
|
||||
});
|
||||
}, "HTMLTableRowElement deleteCell(-2)");
|
||||
|
||||
test(function () {
|
||||
assert_throws("IndexSizeError", function () {
|
||||
tr.deleteCell(tr.cells.length);
|
||||
});
|
||||
}, "HTMLTableRowElement deleteCell(cells.length)");
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user