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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/cells.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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 description('Test behavior of the HTMLTableRowElement cells attribute in cases w here there is unusual nesting.');
2
3 function checkCellNesting(tag)
4 {
5 var row = document.createElement("tr");
6 var container = document.createElement(tag);
7 var cell = document.createElement("td");
8 row.appendChild(container);
9 container.appendChild(cell);
10 return row.cells.length;
11 }
12
13 function checkHeaderCellNesting(tag)
14 {
15 var row = document.createElement("tr");
16 var container = document.createElement(tag);
17 var cell = document.createElement("th");
18 row.appendChild(container);
19 container.appendChild(cell);
20 return row.cells.length;
21 }
22
23 var tags = [
24 "col",
25 "colgroup",
26 "div",
27 "form",
28 "script",
29 "table",
30 "tbody",
31 "tfoot",
32 "thead",
33 "tr",
34 ];
35
36 for (i = 0; i < tags.length; ++i)
37 shouldBe('checkCellNesting("' + tags[i] + '")', '0');
38
39 debug('');
40
41 shouldBe('checkCellNesting("td")', '1');
42 shouldBe('checkCellNesting("th")', '1');
43
44 debug('');
45
46 for (i = 0; i < tags.length; ++i)
47 shouldBe('checkHeaderCellNesting("' + tags[i] + '")', '0');
48
49 debug('');
50
51 shouldBe('checkHeaderCellNesting("td")', '1');
52 shouldBe('checkHeaderCellNesting("th")', '1');
53
54 debug('');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698