| This test checks that offset{Left, Top, Width, Height} work for table columns and column groups. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| When borderCollapse == "separate" |
| |
| Tests for offsetLeft: |
| PASS document.getElementById("productNo").parentNode.offsetLeft is document.getElementById("row1Cell1").offsetLeft |
| PASS document.getElementById("productNo").offsetLeft is document.getElementById("row1Cell1").offsetLeft |
| PASS document.getElementById("productName").offsetLeft is document.getElementById("row1Cell2").offsetLeft |
| PASS document.getElementById("hasMAndHasNAndHasO").offsetLeft is document.getElementById("row1Cell3").offsetLeft |
| PASS document.getElementById("hasMAndHasN").offsetLeft is document.getElementById("row1Cell3").offsetLeft |
| PASS document.getElementById("hasO").offsetLeft is document.getElementById("row1Cell5").offsetLeft |
| PASS document.getElementById("hasP").offsetLeft is document.getElementById("row1Cell6").offsetLeft |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetLeft is 0 |
| |
| Tests for offsetTop: |
| FAIL document.getElementById("productNo").parentNode.offsetTop should be 24. Was 20. |
| FAIL document.getElementById("productNo").offsetTop should be 24. Was 20. |
| FAIL document.getElementById("productName").offsetTop should be 24. Was 20. |
| FAIL document.getElementById("hasMAndHasNAndHasO").offsetTop should be 24. Was 20. |
| FAIL document.getElementById("hasMAndHasN").offsetTop should be 24. Was 20. |
| FAIL document.getElementById("hasO").offsetTop should be 24. Was 20. |
| FAIL document.getElementById("hasP").offsetTop should be 24. Was 20. |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetTop is 0 |
| |
| Tests for offsetWidth: |
| PASS document.getElementById("productNo").parentNode.offsetWidth is 183 |
| PASS document.getElementById("productNo").offsetWidth is 89 |
| PASS document.getElementById("productName").offsetWidth is 90 |
| PASS document.getElementById("hasMAndHasNAndHasO").offsetWidth is 155 |
| PASS document.getElementById("hasMAndHasN").offsetWidth is 103 |
| PASS document.getElementById("hasO").offsetWidth is 48 |
| PASS document.getElementById("hasP").offsetWidth is 46 |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetWidth is 0 |
| |
| Tests for offsetHeight: |
| FAIL document.getElementById("productNo").parentNode.offsetHeight should be 108. Was 116. |
| FAIL document.getElementById("productNo").offsetHeight should be 108. Was 116. |
| FAIL document.getElementById("productName").offsetHeight should be 108. Was 116. |
| FAIL document.getElementById("hasMAndHasNAndHasO").offsetHeight should be 108. Was 116. |
| FAIL document.getElementById("hasMAndHasN").offsetHeight should be 108. Was 116. |
| FAIL document.getElementById("hasO").offsetHeight should be 108. Was 116. |
| FAIL document.getElementById("hasP").offsetHeight should be 108. Was 116. |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetHeight is 0 |
| |
| When borderCollapse == "collapse" |
| |
| Tests for offsetLeft: |
| PASS document.getElementById("productNo").parentNode.offsetLeft is document.getElementById("row1Cell1").offsetLeft |
| PASS document.getElementById("productNo").offsetLeft is document.getElementById("row1Cell1").offsetLeft |
| PASS document.getElementById("productName").offsetLeft is document.getElementById("row1Cell2").offsetLeft |
| PASS document.getElementById("hasMAndHasNAndHasO").offsetLeft is document.getElementById("row1Cell3").offsetLeft |
| PASS document.getElementById("hasMAndHasN").offsetLeft is document.getElementById("row1Cell3").offsetLeft |
| PASS document.getElementById("hasO").offsetLeft is document.getElementById("row1Cell5").offsetLeft |
| PASS document.getElementById("hasP").offsetLeft is document.getElementById("row1Cell6").offsetLeft |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetLeft is 0 |
| |
| Tests for offsetTop: |
| PASS document.getElementById("productNo").parentNode.offsetTop is 19 |
| PASS document.getElementById("productNo").offsetTop is 19 |
| PASS document.getElementById("productName").offsetTop is 19 |
| PASS document.getElementById("hasMAndHasNAndHasO").offsetTop is 19 |
| PASS document.getElementById("hasMAndHasN").offsetTop is 19 |
| PASS document.getElementById("hasO").offsetTop is 19 |
| PASS document.getElementById("hasP").offsetTop is 19 |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetTop is 0 |
| |
| Tests for offsetWidth: |
| PASS document.getElementById("productNo").parentNode.offsetWidth is 175 |
| PASS document.getElementById("productNo").offsetWidth is 87 |
| PASS document.getElementById("productName").offsetWidth is 88 |
| PASS document.getElementById("hasMAndHasNAndHasO").offsetWidth is 141 |
| PASS document.getElementById("hasMAndHasN").offsetWidth is 95 |
| PASS document.getElementById("hasO").offsetWidth is 46 |
| PASS document.getElementById("hasP").offsetWidth is 44 |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetWidth is 0 |
| |
| Tests for offsetHeight: |
| PASS document.getElementById("productNo").parentNode.offsetHeight is 88 |
| PASS document.getElementById("productNo").offsetHeight is 88 |
| PASS document.getElementById("productName").offsetHeight is 88 |
| PASS document.getElementById("hasMAndHasNAndHasO").offsetHeight is 88 |
| PASS document.getElementById("hasMAndHasN").offsetHeight is 88 |
| PASS document.getElementById("hasO").offsetHeight is 88 |
| PASS document.getElementById("hasP").offsetHeight is 88 |
| PASS document.getElementById("columnThatShouldNotBeRendered").offsetHeight is 0 |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |