Changeset 60865 in webkit


Ignore:
Timestamp:
Jun 8, 2010 1:48:50 PM (14 years ago)
Author:
Martin Robinson
Message:

2010-06-08 Martin Robinson <mrobinson@igalia.com>

Reviewed by Ojan Vafai.

editingBehavior settings needs to be set back to a reasonable default between tests
https://bugs.webkit.org/show_bug.cgi?id=39433

This is a re-land of r59840 rolled out in r59857 due to DRT limitations.

  • editing/selection/extend-selection-after-double-click-expected.txt: Updated expectations.
  • editing/selection/extend-selection-after-double-click.html: Use the new DRT support for changing editing behavior.
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r60864 r60865  
     12010-06-08  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        editingBehavior settings needs to be set back to a reasonable default between tests
     6        https://bugs.webkit.org/show_bug.cgi?id=39433
     7
     8        This is a re-land of r59840 rolled out in r59857 due to DRT limitations.
     9
     10        * editing/selection/extend-selection-after-double-click-expected.txt:
     11        Updated expectations.
     12        * editing/selection/extend-selection-after-double-click.html:
     13        Use the new DRT support for changing editing behavior.
     14
    1152010-06-08  Stephen White  <senorblanco@chromium.org>
    216
  • trunk/LayoutTests/editing/selection/extend-selection-after-double-click-expected.txt

    r59857 r60865  
    66
    77SUCCESS
     8SUCCESS
     9
  • trunk/LayoutTests/editing/selection/extend-selection-after-double-click.html

    r59852 r60865  
    1919    }
    2020
    21     function runTest()
     21    function logResult(result)
     22    {
     23        document.getElementById("result").innerHTML += result + "<br/>";
     24    }
     25
     26    function runTests()
    2227    {
    2328        if (!window.eventSender || !window.layoutTestController)
     
    2631        layoutTestController.dumpAsText();
    2732
     33        runTest("mac", "a paragraph");
     34        runTest("win", "paragra");
     35    }
     36
     37    function runTest(behavior, expectedText)
     38    {
     39        layoutTestController.setEditingBehavior(behavior);
    2840        doubleClickWord();
    2941        getSelection().modify("extend", "backward", "character");
     
    3345        getSelection().modify("extend", "backward", "character");
    3446
    35         var result;
    3647        var selectedText = getSelection().toString();
    37         var onMacPlatform = navigator.userAgent.search(/\bMac OS X\b/) != -1;
    38         var expectedText = onMacPlatform ? "a paragraph" : "paragra";
    3948        if (selectedText == expectedText)
    40             result = "SUCCESS";
     49            logResult("SUCCESS");
    4150        else
    42             result = "FAILURE: The selected text is \"" + selectedText + "\" and should be \"" + expectedText + "\".";
    43         document.getElementById("result").firstChild.data = result;
     51            logResult("FAILURE: The selected text is \"" + selectedText + "\" and should be \"" + expectedText + "\".");
    4452    }
    4553</script>
    4654</head>
    47 <body onload="runTest()">
     55<body onload="runTests()">
    4856<p>This tests modifying a selection created with a double click with shift arrow key.</p>
    4957<p style="color:green">
     
    5563</p>
    5664<p>This is a para<span style="color:blue" id="start">g</span>raph.</p>
    57 <p id="result">TEST HAS NOT RUN</p>
     65<p id="result"></p>
    5866</body>
Note: See TracChangeset for help on using the changeset viewer.