Commit 3c25fb48 authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1e7a1745
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.
* editing/selection/extend-selection-after-double-click.html: Revert previous changes to this test.
2010-05-20 Victor Wang <victorw@chromium.org>
Unreviewed. Update test expectations from chromium.
......@@ -18,25 +18,13 @@
eventSender.leapForward(1000);
}
function logResult(result)
{
document.getElementById("result").innerHTML += result + "<br/>";
}
function runTests()
function runTest()
{
if (!window.eventSender || !window.layoutTestController)
return;
layoutTestController.dumpAsText();
runTest("mac", "a paragraph");
runTest("win", "paragra");
}
function runTest(behavior, expectedText)
{
layoutTestController.setEditingBehavior(behavior);
doubleClickWord();
getSelection().modify("extend", "backward", "character");
getSelection().modify("extend", "backward", "character");
......@@ -44,15 +32,19 @@
getSelection().modify("extend", "backward", "character");
getSelection().modify("extend", "backward", "character");
var result;
var selectedText = getSelection().toString();
var onMacPlatform = navigator.userAgent.search(/\bMac OS X\b/) != -1;
var expectedText = onMacPlatform ? "a paragraph" : "paragra";
if (selectedText == expectedText)
logResult("SUCCESS");
result = "SUCCESS";
else
logResult("FAILURE: The selected text is \"" + selectedText + "\" and should be \"" + expectedText + "\".");
result = "FAILURE: The selected text is \"" + selectedText + "\" and should be \"" + expectedText + "\".";
document.getElementById("result").firstChild.data = result;
}
</script>
</head>
<body onload="runTests()">
<body onload="runTest()">
<p>This tests modifying a selection created with a double click with shift arrow key.</p>
<p style="color:green">
This test does not run interactively.
......@@ -62,5 +54,5 @@
The selection should include the words "a paragraph" on mac and "paragra" on win/linux..
</p>
<p>This is a para<span style="color:blue" id="start">g</span>raph.</p>
<p id="result"></p>
<p id="result">TEST HAS NOT RUN</p>
</body>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment