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> <!doctype html>
<style> <style>
.c7 { background: white; direction: rtl; } .tableColumnGroup {
.c7[class*="c7"] { display: table-column-group; } display: table-column-group;
.c13 { display: table-cell; border-style: ridge; will-change: transform; } }
.tableCell {
display: table-cell;
border-style: ridge;
will-change: transform;
}
</style> </style>
<script> <script>
var nodes = Array(); function createAndAppendWithClass(targetType, targetClass) {
nodes[1] = document.createElement('label'); var targetElement = document.createElement(targetType);
nodes[1].setAttribute('class', 'c7'); targetElement.setAttribute('class', targetClass);
document.documentElement.appendChild(nodes[1]); document.documentElement.appendChild(targetElement);
nodes[2] = document.createElement('colgroup'); }
nodes[2].setAttribute('class', 'c11'); createAndAppendWithClass('label', 'tableCell');
document.documentElement.appendChild(nodes[2]); createAndAppendWithClass('aside', 'tableColumnGroup');
nodes[3] = document.createElement('aside');
nodes[3].setAttribute('class', 'c13');
document.documentElement.appendChild(nodes[3]);
</script> </script>
...@@ -2,30 +2,30 @@ ...@@ -2,30 +2,30 @@
<script src="../../resources/run-after-layout-and-paint.js"></script> <script src="../../resources/run-after-layout-and-paint.js"></script>
<!-- Test passes if it does not crash on an ASAN build. --> <!-- Test passes if it does not crash on an ASAN build. -->
<style> <style>
.c7 { .tableColumnGroup {
background: white; background: white;
display: table-column-group; display: table-column-group;
} }
.c13 { .tableCell {
display: table-cell; display: table-cell;
border-style: ridge; border-style: ridge;
will-change: transform; will-change: transform;
} }
</style> </style>
<script> <script>
var label = document.createElement('label'); function createAndAppendWithClass(targetType, targetClass) {
label.setAttribute('class', 'c13'); var targetElement = document.createElement(targetType);
document.documentElement.appendChild(label); targetElement.setAttribute('class', targetClass);
var colgroup = document.createElement('colgroup'); document.documentElement.appendChild(targetElement);
colgroup.setAttribute('class', 'c13'); return targetElement;
document.documentElement.appendChild(colgroup); }
var aside = document.createElement('aside'); var label = createAndAppendWithClass('label', 'tableCell');
aside.setAttribute('class', 'c13'); var colgroup = createAndAppendWithClass('colgroup', 'tableCell');
document.documentElement.appendChild(aside); createAndAppendWithClass('aside', 'tableCell');
if (window.testRunner) if (window.testRunner)
testRunner.waitUntilDone(); testRunner.waitUntilDone();
runAfterLayoutAndPaint(function() { runAfterLayoutAndPaint(function() {
colgroup.setAttribute('class', 'c11'); colgroup.setAttribute('class', '');
label.setAttribute('class', 'c7'); label.setAttribute('class', 'tableColumnGroup');
}, true); }, true);
</script> </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