Commit cb7d7007103d42278e264959732868888defb0fe

Authored by bernard
1 parent b98d9476

Implemented test of cell offsets as test case for HtmlUnit bug.

  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2 + "http://www.w3.org/TR/html4/loose.dtd">
  3 +<html>
  4 +<head>
  5 + <title></title>
  6 + <script type="text/javascript" src="jquery-1.3.2.js"></script>
  7 + <script type="text/javascript">
  8 + jQuery(function() {
  9 + var firstLefts = [];
  10 + var secondLefts = [];
  11 + jQuery("#first td").each(function() {
  12 + firstLefts.push(jQuery(this).offset().left);
  13 + });
  14 + jQuery("#second td").each(function() {
  15 + secondLefts.push(jQuery(this).offset().left);
  16 + });
  17 + for (var i in firstLefts) {
  18 + alert(i + ":" + firstLefts[i] + "?=" + secondLefts[i]);
  19 + alert(firstLefts[i] == secondLefts[i]);
  20 + }
  21 + });
  22 + </script>
  23 +</head>
  24 +<body>
  25 +<table>
  26 + <tr id="first">
  27 + <td>1</td>
  28 + <td>2</td>
  29 + <td>3</td>
  30 + </tr>
  31 + <tr id="second">
  32 + <td>1</td>
  33 + <td>2</td>
  34 + <td>3</td>
  35 + </tr>
  36 +</table>
  37 +</body>
  38 +</html>
Please register or login to post a comment