Commit 1c1e8e1a authored by wkorman's avatar wkorman Committed by Commit bot

Minor test cleanup of table-cell-changes-to-colgroup.html

To improve readability/maintenance.

BUG=666800

Review-Url: https://codereview.chromium.org/2532283002
Cr-Commit-Position: refs/heads/master@{#434799}
parent 190a8431
<!doctype html>
<style>
.c7 { background: white; direction: rtl; }
.c7[class*="c7"] { display: table-column-group; }
.c13 { display: table-cell; border-style: ridge; will-change: transform; }
.tableColumnGroup {
display: table-column-group;
}
.tableCell {
display: table-cell;
border-style: ridge;
will-change: transform;
}
</style>
<script>
var nodes = Array();
nodes[1] = document.createElement('label');
nodes[1].setAttribute('class', 'c7');
document.documentElement.appendChild(nodes[1]);
nodes[2] = document.createElement('colgroup');
nodes[2].setAttribute('class', 'c11');
document.documentElement.appendChild(nodes[2]);
nodes[3] = document.createElement('aside');
nodes[3].setAttribute('class', 'c13');
document.documentElement.appendChild(nodes[3]);
function createAndAppendWithClass(targetType, targetClass) {
var targetElement = document.createElement(targetType);
targetElement.setAttribute('class', targetClass);
document.documentElement.appendChild(targetElement);
}
createAndAppendWithClass('label', 'tableCell');
createAndAppendWithClass('aside', 'tableColumnGroup');
</script>
......@@ -2,30 +2,30 @@
<script src="../../resources/run-after-layout-and-paint.js"></script>
<!-- Test passes if it does not crash on an ASAN build. -->
<style>
.c7 {
.tableColumnGroup {
background: white;
display: table-column-group;
}
.c13 {
.tableCell {
display: table-cell;
border-style: ridge;
will-change: transform;
}
</style>
<script>
var label = document.createElement('label');
label.setAttribute('class', 'c13');
document.documentElement.appendChild(label);
var colgroup = document.createElement('colgroup');
colgroup.setAttribute('class', 'c13');
document.documentElement.appendChild(colgroup);
var aside = document.createElement('aside');
aside.setAttribute('class', 'c13');
document.documentElement.appendChild(aside);
function createAndAppendWithClass(targetType, targetClass) {
var targetElement = document.createElement(targetType);
targetElement.setAttribute('class', targetClass);
document.documentElement.appendChild(targetElement);
return targetElement;
}
var label = createAndAppendWithClass('label', 'tableCell');
var colgroup = createAndAppendWithClass('colgroup', 'tableCell');
createAndAppendWithClass('aside', 'tableCell');
if (window.testRunner)
testRunner.waitUntilDone();
runAfterLayoutAndPaint(function() {
colgroup.setAttribute('class', 'c11');
label.setAttribute('class', 'c7');
colgroup.setAttribute('class', '');
label.setAttribute('class', 'tableColumnGroup');
}, true);
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment