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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/imported/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html
diff --git a/LayoutTests/imported/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html b/LayoutTests/imported/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html
new file mode 100644
index 0000000000000000000000000000000000000000..d9efafaaf5319296e495926afb807ef73b220106
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html
@@ -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>

Powered by Google App Engine
This is Rietveld 408576698