Commit 5baa4614 authored by David Grogan's avatar David Grogan Committed by Commit Bot

[css-tables] Rewrite test to not use eventSender

It had been flaking. Originally written in 2009 to fix
https://bugs.webkit.org/attachment.cgi?id=31754&action=prettypatch

Bug: 831375
Change-Id: Ia6197e7cd0c9b9ba43a77a2183fedbab12f59f94
Reviewed-on: https://chromium-review.googlesource.com/1112760
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570217}
parent 3c16d9d4
<!doctype html>
Script changing col's width, whether via the width attribute on the col
element, or setting width:500px via css, should work.
<table border="1">
<colgroup span="3">
<col width=500 />
<col />
<col />
</colgroup>
<tbody>
<tr>
<td>col 1 row 1</td>
<td>col 2 row 1</td>
<td>col 3 row 1</td>
</tr>
<tr>
<td>col 1 row 2</td>
<td>col 2 row 2</td>
<td>col 3 row 3</td>
</tr>
</tbody>
</table>
<table border="1">
<colgroup span="3">
<col width=500 />
<col />
<col />
</colgroup>
<tbody>
<tr>
<td>col 1 row 1</td>
<td>col 2 row 1</td>
<td>col 3 row 1</td>
</tr>
<tr>
<td>col 1 row 2</td>
<td>col 2 row 2</td>
<td>col 3 row 3</td>
</tr>
</tbody>
</table>
<html> <!doctype html>
<head> Script changing col's width, whether via the width attribute on the col
element, or setting width:500px via css, should work.
<script type="text/javascript"> <table border="1">
<colgroup span="3">
function changeColWidthUsingWidth() <col id="colForAttribute" />
{ <col />
var column = document.getElementById("col"); <col />
column.width = "500px"; </colgroup>
} <tbody>
<tr>
</script> <td>col 1 row 1</td>
</head> <td>col 2 row 1</td>
<body> <td>col 3 row 1</td>
</tr>
<table border="1"> <tr>
<colgroup span="3"> <td>col 1 row 2</td>
<col id="col" /> <td>col 2 row 2</td>
<col /> <td>col 3 row 3</td>
<col /> </tr>
</colgroup> </tbody>
<tbody> </table>
<tr> <table border="1">
<td id="cell">col 1 row 1</td> <colgroup span="3">
<td>col 2 row 1</td> <col id="colForStyle" />
<td>col 3 row 1</td> <col />
</tr> <col />
<tr> </colgroup>
<td>col 1 row 2</td> <tbody>
<td>col 2 row 2</td> <tr>
<td>col 3 row 3</td> <td>col 1 row 1</td>
</tr> <td>col 2 row 1</td>
</tbody> <td>col 3 row 1</td>
</table> </tr>
<button onclick="changeColWidthUsingWidth();">Click me to test manually. The first column should grow to 500px.</button> <tr>
<td>col 1 row 2</td>
<script> <td>col 2 row 2</td>
if (window.eventSender) { <td>col 3 row 3</td>
eventSender.mouseMoveTo(50, 75); </tr>
eventSender.mouseDown(); </tbody>
eventSender.mouseUp(); </table>
} <script>
</script> document.body.offsetTop;
colForAttribute.width = "500px";
</body> colForStyle.style.width = "500px";
</html> </script>
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutTable {TABLE} at (0,0) size 662x56 [border: (1px outset #808080)]
LayoutTableCol {COLGROUP} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableSection {TBODY} at (1,1) size 660x54
LayoutTableRow {TR} at (0,2) size 660x24
LayoutTableCell {TD} at (2,2) size 500x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 72x19
text run at (2,2) width 72: "col 1 row 1"
LayoutTableCell {TD} at (504,2) size 76x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 72x19
text run at (2,2) width 72: "col 2 row 1"
LayoutTableCell {TD} at (582,2) size 76x24 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 72x19
text run at (2,2) width 72: "col 3 row 1"
LayoutTableRow {TR} at (0,28) size 660x24
LayoutTableCell {TD} at (2,28) size 500x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 72x19
text run at (2,2) width 72: "col 1 row 2"
LayoutTableCell {TD} at (504,28) size 76x24 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 72x19
text run at (2,2) width 72: "col 2 row 2"
LayoutTableCell {TD} at (582,28) size 76x24 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 72x19
text run at (2,2) width 72: "col 3 row 3"
LayoutBlockFlow (anonymous) at (0,56) size 784x22
LayoutButton {BUTTON} at (0,0) size 396x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
LayoutBlockFlow (anonymous) at (8,3) size 380x16
LayoutText {#text} at (0,0) size 380x16
text run at (0,0) width 380: "Click me to test manually. The first column should grow to 500px."
LayoutText {#text} at (0,0) size 0x0
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutTable {TABLE} at (0,0) size 664x52 [border: (1px outset #808080)]
LayoutTableCol {COLGROUP} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableSection {TBODY} at (1,1) size 662x50
LayoutTableRow {TR} at (0,2) size 662x22
LayoutTableCell {TD} at (2,2) size 500x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 1 row 1"
LayoutTableCell {TD} at (504,2) size 77x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 2 row 1"
LayoutTableCell {TD} at (583,2) size 77x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 3 row 1"
LayoutTableRow {TR} at (0,26) size 662x22
LayoutTableCell {TD} at (2,26) size 500x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 1 row 2"
LayoutTableCell {TD} at (504,26) size 77x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 2 row 2"
LayoutTableCell {TD} at (583,26) size 77x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 3 row 3"
LayoutBlockFlow (anonymous) at (0,52) size 784x18
LayoutButton {BUTTON} at (0,0) size 342.56x18 [bgcolor=#FFFFFF] [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
LayoutBlockFlow (anonymous) at (8,2) size 326.56x13
LayoutText {#text} at (0,0) size 327x13
text run at (0,0) width 327: "Click me to test manually. The first column should grow to 500px."
LayoutText {#text} at (0,0) size 0x0
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutTable {TABLE} at (0,0) size 664x52 [border: (1px outset #808080)]
LayoutTableCol {COLGROUP} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableSection {TBODY} at (1,1) size 662x50
LayoutTableRow {TR} at (0,2) size 662x22
LayoutTableCell {TD} at (2,2) size 500x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 1 row 1"
LayoutTableCell {TD} at (504,2) size 77x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 2 row 1"
LayoutTableCell {TD} at (583,2) size 77x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 3 row 1"
LayoutTableRow {TR} at (0,26) size 662x22
LayoutTableCell {TD} at (2,26) size 500x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 1 row 2"
LayoutTableCell {TD} at (504,26) size 77x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 2 row 2"
LayoutTableCell {TD} at (583,26) size 77x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 3 row 3"
LayoutBlockFlow (anonymous) at (0,52) size 784x18
LayoutButton {BUTTON} at (0,0) size 355.27x18 [bgcolor=#FFFFFF] [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
LayoutBlockFlow (anonymous) at (8,2) size 339.27x13
LayoutText {#text} at (0,0) size 340x13
text run at (0,0) width 340: "Click me to test manually. The first column should grow to 500px."
LayoutText {#text} at (0,0) size 0x0
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutTable {TABLE} at (0,0) size 664x52 [border: (1px outset #808080)]
LayoutTableCol {COLGROUP} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableSection {TBODY} at (1,1) size 662x50
LayoutTableRow {TR} at (0,2) size 662x22
LayoutTableCell {TD} at (2,2) size 500x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 1 row 1"
LayoutTableCell {TD} at (504,2) size 77x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 2 row 1"
LayoutTableCell {TD} at (583,2) size 77x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 3 row 1"
LayoutTableRow {TR} at (0,26) size 662x22
LayoutTableCell {TD} at (2,26) size 500x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 1 row 2"
LayoutTableCell {TD} at (504,26) size 77x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 2 row 2"
LayoutTableCell {TD} at (583,26) size 77x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 73x18
text run at (2,2) width 73: "col 3 row 3"
LayoutBlockFlow (anonymous) at (0,52) size 784x18
LayoutButton {BUTTON} at (0,0) size 359.45x18 [bgcolor=#FFFFFF] [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
LayoutBlockFlow (anonymous) at (8,2) size 343.45x13
LayoutText {#text} at (0,0) size 344x13
text run at (0,0) width 344: "Click me to test manually. The first column should grow to 500px."
LayoutText {#text} at (0,0) size 0x0
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutTable {TABLE} at (0,0) size 658x56 [border: (1px outset #808080)]
LayoutTableCol {COLGROUP} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableCol {COL} at (0,0) size 0x0
LayoutTableSection {TBODY} at (1,1) size 656x54
LayoutTableRow {TR} at (0,2) size 656x24
LayoutTableCell {TD} at (2,2) size 500x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 70x19
text run at (2,2) width 70: "col 1 row 1"
LayoutTableCell {TD} at (504,2) size 74x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 70x19
text run at (2,2) width 70: "col 2 row 1"
LayoutTableCell {TD} at (580,2) size 74x24 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 70x19
text run at (2,2) width 70: "col 3 row 1"
LayoutTableRow {TR} at (0,28) size 656x24
LayoutTableCell {TD} at (2,28) size 500x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (2,2) size 70x19
text run at (2,2) width 70: "col 1 row 2"
LayoutTableCell {TD} at (504,28) size 74x24 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (2,2) size 70x19
text run at (2,2) width 70: "col 2 row 2"
LayoutTableCell {TD} at (580,28) size 74x24 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
LayoutText {#text} at (2,2) size 70x19
text run at (2,2) width 70: "col 3 row 3"
LayoutBlockFlow (anonymous) at (0,56) size 784x22
LayoutButton {BUTTON} at (0,0) size 394x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
LayoutBlockFlow (anonymous) at (8,3) size 378x16
LayoutText {#text} at (0,0) size 378x16
text run at (0,0) width 378: "Click me to test manually. The first column should grow to 500px."
LayoutText {#text} at (0,0) size 0x0
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