blob: 7adccc83855f4463e51ddeb44adef636fa02f7a6 [file] [log] [blame]
Test for <i><a href=""></a>
Safari Crashes when opening a JS TreeGrid widget</i>.
The test sets up an inline parent with a child that is some kind of table part. The child gets broken off into a continuation and anonymous table parts get created below and/or above the table parts. Then the test tries to insert a new child into the inline, specifying the table part as the "before child". The resulting render tree should look just like it would look if the parent was a block.
function test(display, element)
// Setup
var inline = document.createElement("span");
var beforeChild = inline.appendChild(document.createElement("div")); = display;
beforeChild.appendChild(document.createTextNode("...continues here"));
// Test
var newChild = element ? document.createElement(element) : document.createTextNode("goes here and");
inline.insertBefore(newChild, beforeChild);
test("table-cell", "td");
test("table-cell", "tr");
test("table-cell", "span");
test("table-cell", "div");
test("table-row", "td");
test("table-row", "tr");
test("table-row", "span");
test("table-row", "div");
test("table-row-group", "td");
test("table-row-group", "tr");
test("table-row-group", "span");
test("table-row-group", "div");