Commit d8b5d542 authored by rniwa@webkit.org's avatar rniwa@webkit.org

2011-04-07 Ryosuke Niwa <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        editing/inserting/6633727.html should be renamed and converted into a dump-as-markup test
        https://bugs.webkit.org/show_bug.cgi?id=58037

        Renamed 6633727.html to insert-paragraph-at-end-of-line.html and converted it to a dump-as-markup test.

        * editing/inserting/6633727-expected.txt: Removed.
        * editing/inserting/6633727.html: Removed.
        * editing/inserting/insert-paragraph-at-end-of-line-expected.txt: Added.
        * editing/inserting/insert-paragraph-at-end-of-line.html: Copied from LayoutTests/editing/inserting/6633727.html.
        * editing/inserting/script-tests/6633727.js: Removed.


git-svn-id: svn://svn.chromium.org/blink/trunk@83181 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b1b8ca39
2011-04-07 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Eric Seidel.
editing/inserting/6633727.html should be renamed and converted into a dump-as-markup test
https://bugs.webkit.org/show_bug.cgi?id=58037
Renamed 6633727.html to insert-paragraph-at-end-of-line.html and converted it to a dump-as-markup test.
* editing/inserting/6633727-expected.txt: Removed.
* editing/inserting/6633727.html: Removed.
* editing/inserting/insert-paragraph-at-end-of-line-expected.txt: Added.
* editing/inserting/insert-paragraph-at-end-of-line.html: Copied from LayoutTests/editing/inserting/6633727.html.
* editing/inserting/script-tests/6633727.js: Removed.
2011-04-07 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
This tests the fix for <rdar://problem/6633727> Hitting return at the end of a line with an anchor jumps me to the bottom of the message. If the test has passed, the numbers should be in order, and only "1" should be a link.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS editable.innerHTML is '<a href="#" id="anchor">1</a><div><a href="#" id="anchor"></a>2<br><div>3</div></div>'
PASS sel.baseNode is editable.childNodes.item(1).childNodes.item(1)
PASS sel.baseNode.nodeType is Node.TEXT_NODE
PASS sel.baseOffset is 1
PASS successfullyParsed is true
TEST COMPLETE
1
2
3
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/6633727.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > A > DIV > BODY > HTML > #document to 1 of #text > A > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
This tests the fix for <rdar://problem/6633727> - Hitting return at the end of a line with an anchor jumps me to the bottom of the message.
If the test has passed, the numbers should be in order, and only "1" should be a link.
| <a>
| href="#"
| id="anchor"
| "1"
| <div>
| <a>
| href="#"
| id="anchor"
| "2<#selection-caret>"
| <br>
| <div>
| "3"
description('This tests the fix for &lt;rdar://problem/6633727&gt; Hitting return at the end of a line with an anchor jumps me to the bottom of the message. If the test has passed, the numbers should be in order, and only "1" should be a link.');
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
// Set up the div
var editable = document.createElement('div');
......@@ -13,10 +20,10 @@ sel.setPosition(document.getElementById('anchor'), 1);
document.execCommand("InsertParagraph");
document.execCommand("InsertText", false, "2");
shouldBe("editable.innerHTML", "'"+'<a href="#" id="anchor">1</a><div><a href="#" id="anchor"></a>2<br><div>3</div></div>'+"'");
shouldBe("sel.baseNode", "editable.childNodes.item(1).childNodes.item(1)");
shouldBe("sel.baseNode.nodeType", "Node.TEXT_NODE");
shouldBe("sel.baseOffset", "1");
Markup.description('This tests the fix for <rdar://problem/6633727> - Hitting return at the end of a line with an anchor jumps me to the bottom of the message.\n'+
'If the test has passed, the numbers should be in order, and only "1" should be a link.');
Markup.dump(editable);
var successfullyParsed = true;
</script>
</body>
</html>
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