Changeset 59852 in webkit


Ignore:
Timestamp:
May 20, 2010 11:36:30 AM (14 years ago)
Author:
Martin Robinson
Message:

2010-05-20 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

Revert the changes from r59840 to this test until there is a method
in the WebKit APIs to consistently reset the editingBehavior setting
to a reasonable default.

Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r59850 r59852  
     12010-05-20  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        Revert the changes from r59840 to this test until there is a method
     9        in the WebKit APIs to consistently reset the editingBehavior setting
     10        to a reasonable default.
     11
     12        * editing/selection/extend-selection-after-double-click.html: Revert previous changes to this test.
    1132010-05-20  Victor Wang  <victorw@chromium.org>
    214
  • trunk/LayoutTests/editing/selection/extend-selection-after-double-click.html

    r59840 r59852  
    1919    }
    2020
    21     function logResult(result)
    22     {
    23         document.getElementById("result").innerHTML += result + "<br/>";
    24     }
    25 
    26     function runTests()
     21    function runTest()
    2722    {
    2823        if (!window.eventSender || !window.layoutTestController)
     
    3126        layoutTestController.dumpAsText();
    3227
    33         runTest("mac", "a paragraph");
    34         runTest("win", "paragra");
    35     }
    36 
    37     function runTest(behavior, expectedText)
    38     {
    39         layoutTestController.setEditingBehavior(behavior);
    4028        doubleClickWord();
    4129        getSelection().modify("extend", "backward", "character");
     
    4533        getSelection().modify("extend", "backward", "character");
    4634
     35        var result;
    4736        var selectedText = getSelection().toString();
     37        var onMacPlatform = navigator.userAgent.search(/\bMac OS X\b/) != -1;
     38        var expectedText = onMacPlatform ? "a paragraph" : "paragra";
    4839        if (selectedText == expectedText)
    49             logResult("SUCCESS");
     40            result = "SUCCESS";
    5041        else
    51             logResult("FAILURE: The selected text is \"" + selectedText + "\" and should be \"" + expectedText + "\".");
     42            result = "FAILURE: The selected text is \"" + selectedText + "\" and should be \"" + expectedText + "\".";
     43        document.getElementById("result").firstChild.data = result;
    5244    }
    5345</script>
    5446</head>
    55 <body onload="runTests()">
     47<body onload="runTest()">
    5648<p>This tests modifying a selection created with a double click with shift arrow key.</p>
    5749<p style="color:green">
     
    6355</p>
    6456<p>This is a para<span style="color:blue" id="start">g</span>raph.</p>
    65 <p id="result"></p>
     57<p id="result">TEST HAS NOT RUN</p>
    6658</body>
Note: See TracChangeset for help on using the changeset viewer.