Changeset 89668 in webkit


Ignore:
Timestamp:
Jun 24, 2011, 5:02:11 AM (14 years ago)
Author:
tkent@chromium.org
Message:

2011-06-24 Kent Tamura <tkent@chromium.org>

Reviewed by Dimitri Glazkov.

Clean up some tests for search cancel buttons.
https://bugs.webkit.org/show_bug.cgi?id=63121

  • Introduce a function to retrieve a reliable position of a search cancel button.
  • Convert two tests to dumpAsText().
  • fast/forms/resources/common.js: (searchCancelButtonPosition): Added.
  • fast/forms/search-abs-pos-cancel-button.html: Use searchCancelButtonPosition().
  • fast/forms/search-cancel-button-mouseup.html: Use searchCancelButtonPosition().
  • fast/forms/search-transformed-expected.txt: Added.
  • fast/forms/search-transformed.html:
    • Use searchCancelButtonPosition().
    • Convert to dumpAsText().
  • fast/forms/search-zoomed-expected.txt: Added.
  • fast/forms/search-zoomed.html:
    • Use searchCancelButtonPosition().
    • Convert to dumpAsText().
  • platform/chromium/test_expectation.txt: search-transformed.html should pass.
  • platform/chromium-linux/fast/forms/search-zoomed-expected.png: Removed.
  • platform/chromium-mac-leopard/fast/forms/search-transformed-expected.png: Removed.
  • platform/chromium-mac-leopard/fast/forms/search-zoomed-expected.png: Removed.
  • platform/chromium-mac/fast/forms/search-transformed-expected.png: Removed.
  • platform/chromium-win/fast/forms/search-zoomed-expected.png: Removed.
  • platform/chromium-win/fast/forms/search-zoomed-expected.txt: Removed.
  • platform/gtk/fast/forms/search-transformed-expected.png: Removed.
  • platform/gtk/fast/forms/search-transformed-expected.txt: Removed.
  • platform/gtk/fast/forms/search-zoomed-expected.png: Removed.
  • platform/gtk/fast/forms/search-zoomed-expected.txt: Removed.
  • platform/mac-leopard/fast/forms/search-zoomed-expected.png: Removed.
  • platform/mac/fast/forms/search-transformed-expected.png: Removed.
  • platform/mac/fast/forms/search-transformed-expected.txt: Removed.
  • platform/mac/fast/forms/search-zoomed-expected.png: Removed.
  • platform/mac/fast/forms/search-zoomed-expected.txt: Removed.
  • platform/qt/fast/forms/search-transformed-expected.txt: Removed.
  • platform/qt/fast/forms/search-zoomed-expected.txt: Removed.
Location:
trunk/LayoutTests
Files:
2 added
17 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r89667 r89668  
     12011-06-24  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Clean up some tests for search cancel buttons.
     6        https://bugs.webkit.org/show_bug.cgi?id=63121
     7
     8        - Introduce a function to retrieve a reliable position of a search
     9          cancel button.
     10        - Convert two tests to dumpAsText().
     11
     12        * fast/forms/resources/common.js:
     13        (searchCancelButtonPosition): Added.
     14        * fast/forms/search-abs-pos-cancel-button.html: Use searchCancelButtonPosition().
     15        * fast/forms/search-cancel-button-mouseup.html: Use searchCancelButtonPosition().
     16        * fast/forms/search-transformed-expected.txt: Added.
     17        * fast/forms/search-transformed.html:
     18          - Use searchCancelButtonPosition().
     19          - Convert to dumpAsText().
     20        * fast/forms/search-zoomed-expected.txt: Added.
     21        * fast/forms/search-zoomed.html:
     22          - Use searchCancelButtonPosition().
     23          - Convert to dumpAsText().
     24        * platform/chromium/test_expectation.txt:
     25          search-transformed.html should pass.
     26        * platform/chromium-linux/fast/forms/search-zoomed-expected.png: Removed.
     27        * platform/chromium-mac-leopard/fast/forms/search-transformed-expected.png: Removed.
     28        * platform/chromium-mac-leopard/fast/forms/search-zoomed-expected.png: Removed.
     29        * platform/chromium-mac/fast/forms/search-transformed-expected.png: Removed.
     30        * platform/chromium-win/fast/forms/search-zoomed-expected.png: Removed.
     31        * platform/chromium-win/fast/forms/search-zoomed-expected.txt: Removed.
     32        * platform/gtk/fast/forms/search-transformed-expected.png: Removed.
     33        * platform/gtk/fast/forms/search-transformed-expected.txt: Removed.
     34        * platform/gtk/fast/forms/search-zoomed-expected.png: Removed.
     35        * platform/gtk/fast/forms/search-zoomed-expected.txt: Removed.
     36        * platform/mac-leopard/fast/forms/search-zoomed-expected.png: Removed.
     37        * platform/mac/fast/forms/search-transformed-expected.png: Removed.
     38        * platform/mac/fast/forms/search-transformed-expected.txt: Removed.
     39        * platform/mac/fast/forms/search-zoomed-expected.png: Removed.
     40        * platform/mac/fast/forms/search-zoomed-expected.txt: Removed.
     41        * platform/qt/fast/forms/search-transformed-expected.txt: Removed.
     42        * platform/qt/fast/forms/search-zoomed-expected.txt: Removed.
     43
    1442011-06-24  Kent Tamura  <tkent@chromium.org>
    245
  • trunk/LayoutTests/fast/forms/resources/common.js

    r86224 r89668  
    1616    return rect;
    1717}
     18
     19function searchCancelButtonPosition(element) {
     20    var pos = {};
     21    pos.x = element.offsetLeft + element.offsetWidth - 9;
     22    pos.y = element.offsetTop + element.offsetHeight / 2;
     23    return pos;
     24}
  • trunk/LayoutTests/fast/forms/search-abs-pos-cancel-button.html

    r89460 r89668  
    22<head>
    33    <title>Search Field with Transform</title>
     4    <script src="resources/common.js"></script>
    45    <script type="text/javascript" charset="utf-8">
    56      if (window.layoutTestController)
     
    1920        if (window.eventSender) {
    2021            var target = document.getElementById("target");
    21             var x = target.offsetLeft + target.offsetWidth - 4;
    22             var y = target.offsetTop + target.offsetHeight / 2;
    23             eventSender.mouseMoveTo(x, y);
     22            var cancelPos = searchCancelButtonPosition(target);
     23            eventSender.mouseMoveTo(cancelPos.x, cancelPos.y);
    2424            eventSender.mouseDown();
    2525            eventSender.mouseUp();
  • trunk/LayoutTests/fast/forms/search-cancel-button-mouseup.html

    r89460 r89668  
    22<head>
    33    <title></title>
     4    <script src="resources/common.js"></script>
    45    <script>
    56        function test()
     
    1415            var s3 = document.getElementById("search3");
    1516
    16             var buttonX = s1.offsetLeft + s1.offsetWidth - 6;
     17            var s1cancelPos = searchCancelButtonPosition(s1);
     18            var buttonX = s1cancelPos.x;
    1719            var middleX = s1.offsetLeft + s1.offsetWidth / 2;
    1820
    19             var y1 = s1.offsetTop + s1.offsetHeight / 2;
    2021            var y2 = s2.offsetTop + s2.offsetHeight / 2;
    2122            var y3 = s3.offsetTop + s3.offsetHeight / 2;
    2223
    23             eventSender.mouseMoveTo(buttonX, y1);
     24            eventSender.mouseMoveTo(buttonX, s1cancelPos.y);
    2425            eventSender.mouseDown();
    25             eventSender.mouseMoveTo(middleX, y1);
     26            eventSender.mouseMoveTo(middleX, s1cancelPos.y);
    2627            eventSender.mouseUp();
    2728            eventSender.leapForward(1000);
  • trunk/LayoutTests/fast/forms/search-transformed.html

    r43007 r89668  
    33    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    44    <title>Search Field with Transform</title>
     5    <script src="resources/common.js"></script>
    56</head>
    67<body>
     
    1617    </p>
    1718    <script>
     19        if (window.layoutTestController)
     20            layoutTestController.dumpAsText();
    1821        if (window.eventSender) {
    1922            var target = document.getElementById("target");
    2023            var translationAmount = 50;
    21             var x = target.offsetLeft + target.offsetWidth + translationAmount - 5;
    22             var y = target.offsetTop + target.offsetHeight + translationAmount - 5;
    23             eventSender.mouseMoveTo(x, y);
     24            var cancelPos = searchCancelButtonPosition(target);
     25            eventSender.mouseMoveTo(cancelPos.x + translationAmount, cancelPos.y + translationAmount);
    2426            eventSender.mouseDown();
    2527            eventSender.mouseUp();
  • trunk/LayoutTests/fast/forms/search-zoomed.html

    r43007 r89668  
    88      }
    99    </style>
     10    <script src="resources/common.js"></script>
    1011</head>
    1112<body>
     
    2122    </p>
    2223    <script>
     24        if (window.layoutTestController)
     25            layoutTestController.dumpAsText();
    2326        if (window.eventSender) {
    2427            var target = document.getElementById("target");
    25             var x = target.offsetLeft + target.offsetWidth - 5;
    26             var y = target.offsetTop + target.offsetHeight - 5;
    27             x = x * 1.2;
    28             y = y * 1.2;
    29             eventSender.mouseMoveTo(x, y);
     28            var cancelPos = searchCancelButtonPosition(target);
     29            eventSender.mouseMoveTo(cancelPos.x * 1.2, cancelPos.y * 1.2);
    3030            eventSender.mouseDown();
    3131            eventSender.mouseUp();
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r89665 r89668  
    14141414BUGCR5737 LINUX : fast/forms/001.html = FAIL
    14151415BUGCR5737 LINUX : fast/forms/input-first-letter.html = FAIL
    1416 
    1417 // The (x) in type=search inputs appears to be slightly broken.  This test will also need a rebaseline.
    1418 BUGCR20439 WIN LINUX : fast/forms/search-transformed.html = FAIL
    14191416
    14201417// New test. We should fix it, but it doesn't need to block the current release
Note: See TracChangeset for help on using the changeset viewer.