⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 98685 in webkit


Ignore:
Timestamp:
Oct 27, 2011, 9:24:35 PM (15 years ago)
Author:
rniwa@webkit.org
Message:

Fix click-before-and-after-table.html for Chromium
https://bugs.webkit.org/show_bug.cgi?id=70869

Reviewed by Tony Chang.

Fixed the test by wrapping tests in a function to avoid shadowing "top" variable.

  • editing/selection/click-before-and-after-table.html:
  • platform/chromium/test_expectations.txt:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r98683 r98685  
     12011-10-27  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Fix click-before-and-after-table.html for Chromium
     4        https://bugs.webkit.org/show_bug.cgi?id=70869
     5
     6        Reviewed by Tony Chang.
     7
     8        Fixed the test by wrapping tests in a function to avoid shadowing "top" variable.
     9
     10        * editing/selection/click-before-and-after-table.html:
     11        * platform/chromium/test_expectations.txt:
     12
    1132011-10-27  John Gregg  <johnnyg@google.com>
    214
  • trunk/LayoutTests/editing/selection/click-before-and-after-table.html

    r41657 r98685  
    1 <script>
    2 if (window.layoutTestController)
    3      layoutTestController.dumpEditingCallbacks();
    4 </script>
    51<style>
    62td {
     
    128<ul id="console"></ul>
    139<script>
     10if (window.layoutTestController)
     11     layoutTestController.dumpEditingCallbacks();
     12
    1413function log(message) {
    1514    var console = document.getElementById("console");
     
    2019    li.appendChild(text);
    2120}
    22 if (!window.layoutTestController) {
    23     log("This test uses the eventSender to do mouse clicks.  To run it manually, click after the table, the caret should appear there (and not inside the table).  Then click inside the table.  The caret should appear inside it.");
    24     document.body.addEventListener("click", function() { var s = window.getSelection(); log("click @ " + event.clientX + ", " + event.clientY + " caret at: " + s.anchorNode + ", " + s.anchorOffset); }, true);
    25 } else {
     21
     22function runAutomatedTest() {
    2623    window.layoutTestController.dumpAsText();
    2724    var s, x, y, e, top, bottom, left, right;
     
    7370        log("Failure: Clicking @ " + x + ", " + y + " inside the table put the caret before or after it.  Instead: " + s.anchorNode + ", " + s.anchorOffset);
    7471}
     72
     73if (window.layoutTestController)
     74    runAutomatedTest();
     75else {
     76    log("This test uses the eventSender to do mouse clicks.  To run it manually, click after the table, the caret should appear there (and not inside the table).  Then click inside the table.  The caret should appear inside it.");
     77    document.body.addEventListener("click", function() { var s = window.getSelection(); log("click @ " + event.clientX + ", " + event.clientY + " caret at: " + s.anchorNode + ", " + s.anchorOffset); }, true);
     78}
     79
    7580</script>
    7681</body>
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r98683 r98685  
    479479// supporting that option.
    480480WONTFIX SKIP : fast/parser/pre-html5-parser-quirks.html = FAIL
    481 
    482 // These tests have been rewritten, with the original being ignored,
    483 // because they rely on being able to shadow the 'top' variable on the
    484 // global object.  For security we disallow shadowing of top.
    485 WONTFIX SKIP : editing/selection/click-before-and-after-table.html = FAIL
    486481
    487482// We're taking a different approach on this test than Webkit does, related to
Note: See TracChangeset for help on using the changeset viewer.