Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html

Issue 1213063003: update-w3c-deps import using blink 3b531d5bb326db09a7298b222030cf274590473d: (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add rtcpeerconnection-idl-expected.txt Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>HTMLTableRowElement#deleteCell</title>
4 <link rel="author" title="Intel" href="http://www.intel.com/">
5 <script src="../../../../../../resources/testharness.js"></script>
6 <script src="../../../../../../resources/testharnessreport.js"></script>
7
8 <div id="log"></div>
9
10 <table>
11 <tr id="testTr">
12 <td>ABCDE</td>
13 <td>12345</td>
14 <td>ABC12</td>
15 </tr>
16 </table>
17
18 <script>
19
20 var tr = document.getElementById("testTr");
21
22 test(function () {
23 tr.deleteCell(0);
24 assert_equals(tr.cells[0].innerHTML, "12345");
25 assert_equals(tr.cells.length, 2);
26 }, "HTMLTableRowElement deleteCell(0)");
27
28 test(function () {
29 tr.deleteCell(-1);
30 assert_equals(tr.cells[tr.cells.length - 1].innerHTML, "12345");
31 assert_equals(tr.cells.length, 1);
32 }, "HTMLTableRowElement deleteCell(-1)");
33
34 test(function () {
35 assert_throws("IndexSizeError", function () {
36 tr.deleteCell(-2);
37 });
38 }, "HTMLTableRowElement deleteCell(-2)");
39
40 test(function () {
41 assert_throws("IndexSizeError", function () {
42 tr.deleteCell(tr.cells.length);
43 });
44 }, "HTMLTableRowElement deleteCell(cells.length)");
45
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698