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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/tabular-data/the-table-element/remove-row.html

Issue 2434563008: Import wpt@26c8d4e87448d1c4e5ebf2ddb4917c0633c201db (Closed)
Patch Set: Mark one more test as potentially timing out Created 4 years, 1 month 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
1 <!doctype html> 1 <!doctype html>
2 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>Delete Row tests</title> 3 <title>Delete Row tests</title>
4 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 6
7 <table id="element"> 7 <table id="element">
8 <thead> 8 <thead>
9 <th>First column</th> 9 <th>First column</th>
10 <th>Second column</th> 10 <th>Second column</th>
(...skipping 24 matching lines...) Expand all
35 }) 35 })
36 }, 'deleteRow function invalid argument bis'); 36 }, 'deleteRow function invalid argument bis');
37 37
38 test(function() { 38 test(function() {
39 var old_length = el.rows.length; 39 var old_length = el.rows.length;
40 el.insertRow(-1); 40 el.insertRow(-1);
41 el.deleteRow(-1); 41 el.deleteRow(-1);
42 assert_equals(old_length, el.rows.length); 42 assert_equals(old_length, el.rows.length);
43 }, "check normal deleteRow"); 43 }, "check normal deleteRow");
44 test(function() { 44 test(function() {
45 while (el.rows.length > 1) { 45 assert_equals(el.rows.length, 3);
46 do {
47 var old_length = el.rows.length;
46 el.deleteRow(-1); 48 el.deleteRow(-1);
47 } 49 assert_equals(el.rows.length, old_length - 1);
48 assert_equals(1, el.rows.length); 50 } while (el.rows.length);
49 }, "check normal deleteRow bis"); 51 }, "check normal deleteRow bis");
52
53 test(function() {
54 assert_equals(el.rows.length, 0);
55 el.deleteRow(-1);
56 }, 'deleteRow(-1) with no rows');
57
58 test(function() {
59 assert_equals(el.rows.length, 0);
60 assert_throws("IndexSizeError", function() {
61 el.deleteRow(0);
62 });
63 }, 'deleteRow(0) with no rows');
50 </script> 64 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698