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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-65-excerpt.html

Issue 2785963002: Move tests for table elements to LayoutTests/html/tabular_data/. (Closed)
Patch Set: Created 3 years, 8 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 PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description('An excerpt from an early Acid3 test 65: construct a table, and see if the table is as expected');
9
10 var table = document.createElement('table');
11 table.appendChild(document.createElement('tbody'));
12 var tr1 = document.createElement('tr');
13 table.appendChild(tr1);
14 table.appendChild(document.createElement('caption'));
15 table.appendChild(document.createElement('thead'));
16 // <table><tbody/><tr/><caption/><thead/>
17 table.insertBefore(table.firstChild.nextSibling, null); // move the <tr/> to the end
18 // <table><tbody/><caption/><thead/><tr/>
19 table.replaceChild(table.firstChild, table.lastChild); // move the <tbody/> to t he end and remove the <tr>
20 // <table><caption/><thead/><tbody/>
21 var tr2 = table.tBodies[0].insertRow(0);
22 // <table><caption/><thead/><tbody><tr/></tbody>
23 shouldBe("table.tBodies[0].rows[0].rowIndex", "0");
24 shouldBe("table.tBodies[0].rows[0].sectionRowIndex", "0");
25 shouldBe("table.childNodes.length", "3");
26 shouldBe("!!table.caption", "true");
27 shouldBe("!!table.tHead", "true");
28 shouldBe("table.tFoot", "null");
29 shouldBe("table.tBodies.length", "1");
30 shouldBe("table.rows.length", "1");
31 shouldBe("tr1.parentNode", "null");
32 shouldBe("table.caption", "table.createCaption()");
33 shouldBe("table.tFoot", "null");
34 shouldBe("table.tHead", "table.createTHead()");
35 shouldBe("table.createTFoot()", "table.tFoot");
36 // either: <table><caption/><thead/><tbody><tr/></tbody><tfoot/>
37 // or: <table><caption/><thead/><tfoot/><tbody><tr/></tbody>
38 table.tHead.appendChild(tr1);
39 // either: <table><caption/><thead><tr/></thead><tbody><tr/></tbody><tfoot/>
40 // or: <table><caption/><thead><tr/></thead><tfoot/><tbody><tr/></tbody>
41 shouldBe("table.rows[0]", "table.tHead.firstChild");
42 shouldBe("table.rows.length", "2");
43 shouldBe("table.rows[1]", "table.tBodies[0].firstChild");
44 </script>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698