Changeset 69466 in webkit


Ignore:
Timestamp:
Oct 10, 2010 7:14:53 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-10-10 Antonio Gomes <agomes@rim.com>

Reviewed by Andreas Kling.

editing/selection/extend-after-mouse-selection.html should useLayoutTestController::setEditingBehavior
https://bugs.webkit.org/show_bug.cgi?id=47468

Changed editing/selection/extend-after-mouse-selection.html to use the LayoutTestController::setEditingBehavior
machinary. It makes it possible to remove platform dependent test results by testing through all
platform-specific codepath's we have.

  • editing/selection/extend-after-mouse-selection.html:
  • platform/editing/selection/extend-after-mouse-selection-expected.txt: Added.
  • platform/mac/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
  • platform/win/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
Location:
trunk/LayoutTests
Files:
1 added
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69456 r69466  
     12010-10-10  Antonio Gomes  <agomes@rim.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        editing/selection/extend-after-mouse-selection.html should use LayoutTestController::setEditingBehavior
     6        https://bugs.webkit.org/show_bug.cgi?id=47468
     7
     8        Changed editing/selection/extend-after-mouse-selection.html to use the LayoutTestController::setEditingBehavior
     9        machinary. It makes it possible to remove platform dependent test results by testing through all
     10        platform-specific codepath's we have.
     11
     12        * editing/selection/extend-after-mouse-selection.html:
     13        * platform/editing/selection/extend-after-mouse-selection-expected.txt: Added.
     14        * platform/mac/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
     15        * platform/win/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
     16
    1172010-10-09  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/LayoutTests/editing/selection/extend-after-mouse-selection.html

    r56639 r69466  
    1414
    1515<script>
    16 // FIXME: Expose settings->editingBehavior() and use that here instead.
    17 var onMacPlatform = navigator.userAgent.search(/\bMac OS X\b/) != -1;
    1816
    19 function editingTest() {
     17function editingTest(editingBehavior) {
     18
     19    if (window.layoutTestController)
     20        layoutTestController.setEditingBehavior(editingBehavior);
     21
    2022    var startTarget = document.getElementById('start');
    2123    var endTarget = document.getElementById('end');
     
    3436    extendSelectionBackwardByCharacterCommand();
    3537
    36 
    3738    // On Win/Linux the anchor is be fixed after the mouse-selection and never changes.
    3839    // On Mac, the first character-granularity selection after a mouse-selection resets the anchor/focus.
    39     if (onMacPlatform)
     40    if (editingBehavior == "mac")
    4041        assertSelectionAt(endTarget.firstChild, 2, startTarget.previousSibling, 1);
    4142    else
     
    4344
    4445    extendSelectionForwardByCharacterCommand();
    45     if (onMacPlatform)
     46    if (editingBehavior == "mac")
    4647        assertSelectionAt(endTarget.firstChild, 2, startTarget.firstChild, 0);
    4748    else
     
    5051    extendSelectionForwardByLineBoundaryCommand();
    5152
    52     if (onMacPlatform)
     53    if (editingBehavior == "mac")
    5354        assertSelectionAt(endTarget.nextSibling, 1, startTarget.firstChild, 0);
    5455    else
     
    5758    extendSelectionBackwardByLineBoundaryCommand();
    5859
    59     if (onMacPlatform)
     60    if (editingBehavior == "mac")
    6061        assertSelectionAt(endTarget.nextSibling, 1, startTarget.previousSibling, 0);
    6162    else
     
    7576
    7677<script>
    77 editingTest();
     78editingTest("mac");
     79editingTest("win");
    7880var successfullyParsed = true;
    7981</script>
Note: See TracChangeset for help on using the changeset viewer.