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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/tabular-data/the-table-element/insertRow-method-02.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>insertRow(): Empty table</title>
3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-table-insertr ow">
5 <script src="../../../../../../resources/testharness.js"></script>
6 <script src="../../../../../../resources/testharnessreport.js"></script>
7 <div id="log"></div>
8 <div id="test">
9 <table></table>
10 </div>
11 <script>
12 var HTML = "http://www.w3.org/1999/xhtml";
13 test(function() {
14 var table = document.getElementById("test").getElementsByTagName("table")[0];
15 test(function() {
16 assert_equals(table.childNodes.length, 0);
17 assert_equals(table.rows.length, 0);
18 }, "table should start out empty")
19
20 var tr;
21 test(function() {
22 tr = table.insertRow(0);
23 assert_equals(tr.localName, "tr");
24 assert_equals(tr.namespaceURI, HTML);
25 }, "insertRow should insert a tr element")
26
27 var tbody = tr.parentNode;
28 test(function() {
29 assert_equals(tbody.localName, "tbody");
30 assert_equals(tbody.namespaceURI, HTML);
31 assert_equals(tbody.parentNode, table);
32 }, "insertRow should insert a tbody element")
33 });
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698