[webkit-changes] cvs commit: LayoutTests/editing/selection
triple-click-in-pre-expected.checksum
triple-click-in-pre-expected.png
triple-click-in-pre-expected.txt triple-click-in-pre.html
Justin
justing at opensource.apple.com
Fri Dec 9 18:59:15 PST 2005
justing 05/12/09 18:59:14
Modified: . ChangeLog
Added: editing/pasteboard paste-pre-002-expected.checksum
paste-pre-002-expected.png
paste-pre-002-expected.txt paste-pre-002.html
editing/selection triple-click-in-pre-expected.checksum
triple-click-in-pre-expected.png
triple-click-in-pre-expected.txt
triple-click-in-pre.html
Log:
New layout tests for:
<rdar://problem/4370209> Reproducible crash when pasting over whitespace:pre text
<rdar://problem/4370220> Double or triple clicking in whitespace:pre text creates incorrect selections
Reviewed by harrison
* editing/pasteboard/paste-pre-002-expected.checksum: Added.
* editing/pasteboard/paste-pre-002-expected.png: Added.
* editing/pasteboard/paste-pre-002-expected.txt: Added.
* editing/pasteboard/paste-pre-002.html: Added.
* editing/selection/triple-click-in-pre-expected.checksum: Added.
* editing/selection/triple-click-in-pre-expected.png: Added.
* editing/selection/triple-click-in-pre-expected.txt: Added.
* editing/selection/triple-click-in-pre.html: Added.
Revision Changes Path
1.132 +17 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- ChangeLog 8 Dec 2005 09:30:25 -0000 1.131
+++ ChangeLog 10 Dec 2005 02:59:11 -0000 1.132
@@ -1,3 +1,20 @@
+2005-12-09 Justin Garcia <justin.garcia at apple.com>
+
+ New layout tests for:
+ <rdar://problem/4370209> Reproducible crash when pasting over whitespace:pre text
+ <rdar://problem/4370220> Double or triple clicking in whitespace:pre text creates incorrect selections
+
+ Reviewed by harrison
+
+ * editing/pasteboard/paste-pre-002-expected.checksum: Added.
+ * editing/pasteboard/paste-pre-002-expected.png: Added.
+ * editing/pasteboard/paste-pre-002-expected.txt: Added.
+ * editing/pasteboard/paste-pre-002.html: Added.
+ * editing/selection/triple-click-in-pre-expected.checksum: Added.
+ * editing/selection/triple-click-in-pre-expected.png: Added.
+ * editing/selection/triple-click-in-pre-expected.txt: Added.
+ * editing/selection/triple-click-in-pre.html: Added.
+
2005-12-08 Eric Seidel <eseidel at apple.com>
Reviewed by darin.
1.1 LayoutTests/editing/pasteboard/paste-pre-002-expected.checksum
Index: paste-pre-002-expected.checksum
===================================================================
a3a0c452747fa15cfea12557e94d523e
1.1 LayoutTests/editing/pasteboard/paste-pre-002-expected.png
<<Binary file>>
1.1 LayoutTests/editing/pasteboard/paste-pre-002-expected.txt
Index: paste-pre-002-expected.txt
===================================================================
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of PRE > DIV > DIV > BODY > HTML > #document to 0 of PRE > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > PRE > DIV > DIV > BODY > HTML > #document to 7 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of #text > PRE > DIV > DIV > BODY > HTML > #document to 7 of #text > PRE > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text to 7 of #text toDOMRange:range from 7 of #text > PRE > DIV > DIV > BODY > HTML > #document to 7 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x579
RenderBlock {DIV} at (0,0) size 784x36
RenderText {TEXT} at (0,0) size 147x18
text run at (0,0) width 147: "This is a layout test for "
RenderInline {A} at (0,0) size 149x18 [color=#0000EE]
RenderText {TEXT} at (147,0) size 149x18
text run at (147,0) width 149: "rdar://problem/4370209"
RenderText {TEXT} at (296,0) size 784x36
text run at (296,0) width 393: " \"Reproducible crash when pasting over whitespace:pre text\". "
text run at (689,0) width 95: "The text below"
text run at (0,18) width 263: "is selected, copied, and pasted over itself. "
text run at (263,18) width 205: "You'll see foo/nbar if successful."
RenderBlock {DIV} at (0,49) size 784x30
RenderBlock {DIV} at (0,0) size 784x30
RenderBlock {PRE} at (0,0) size 784x30
RenderText {TEXT} at (0,0) size 24x30
text run at (0,0) width 24: "foo"
text run at (0,15) width 24: "bar"
caret: position 7 of child 0 {TEXT} of child 1 {PRE} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
1.1 LayoutTests/editing/pasteboard/paste-pre-002.html
Index: paste-pre-002.html
===================================================================
<html>
<head>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function editingTest() {
selectAllCommand();
copyCommand();
pasteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body>
<div>
This is a layout test for <a href="rdar://problem/4370209">rdar://problem/4370209</a> "Reproducible crash when pasting over whitespace:pre text". The text below is selected, copied, and pasted over itself. You'll see foo/nbar if successful.
</div>
<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
<div id="test" class="editing">
<pre>foo
bar</pre>
</div>
</div>
<script>
runEditingTest();
</script>
</body>
</html>
1.1 LayoutTests/editing/selection/triple-click-in-pre-expected.checksum
Index: triple-click-in-pre-expected.checksum
===================================================================
fa035e64ae2e2a22c8fb24691a71ae32
1.1 LayoutTests/editing/selection/triple-click-in-pre-expected.png
<<Binary file>>
1.1 LayoutTests/editing/selection/triple-click-in-pre-expected.txt
Index: triple-click-in-pre-expected.txt
===================================================================
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 30 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 30 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 16 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {TEXT} at (0,0) size 678x18
text run at (0,0) width 379: "This tests modifying a selection created with a double click. "
text run at (379,0) width 299: "The new selection should use word granularity."
RenderBlock {P} at (0,34) size 784x54 [color=#008000]
RenderText {TEXT} at (0,0) size 764x54
text run at (0,0) width 224: "This test does not run interactively. "
text run at (224,0) width 414: "It uses the layoutTestControllers eventSender to do mouse clicks. "
text run at (638,0) width 121: "To run it manually,"
text run at (0,18) width 522: "triple click on the second line in the box below (anywhere after \"whitespace:pre\"). "
text run at (522,18) width 242: "The triple click should select the entire"
text run at (0,36) width 27: "line."
RenderBlock {DIV} at (0,104) size 784x58
RenderBlock {DIV} at (0,0) size 784x58 [border: (1px solid #0000FF)]
RenderBlock {PRE} at (1,14) size 782x30
RenderText {TEXT} at (0,0) size 120x30
text run at (0,0) width 120: "this text is in"
text run at (0,15) width 112: "whitespace:pre"
selection start: position 16 of child 0 {TEXT} of child 1 {PRE} of child 1 {DIV} of child 5 {DIV} of child 1 {BODY} of child 0 {HTML} of document
selection end: position 30 of child 0 {TEXT} of child 1 {PRE} of child 1 {DIV} of child 5 {DIV} of child 1 {BODY} of child 0 {HTML} of document
1.1 LayoutTests/editing/selection/triple-click-in-pre.html
Index: triple-click-in-pre.html
===================================================================
<html>
<head>
<script>
function editingTest() {
var elem = document.getElementById("elem");
// x, y should be a position on the second line (after whitespace:pre).
x = elem.offsetLeft + elem.offsetWidth - 30;
y = elem.offsetTop + elem.offsetHeight / 2 + 10;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseUp();
eventSender.mouseDown();
eventSender.mouseUp();
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>
</head>
<body>
<p>This tests modifying a selection created with a double click. The new selection should use word granularity.</p>
<p style="color:green">This test does not run interactively. It uses the layoutTestControllers eventSender to do mouse clicks. To run it manually, triple click on the second line in the box below (anywhere after "whitespace:pre"). The triple click should select the entire line.</p>
<div contenteditable id="elem">
<div style="border:1px solid blue">
<pre id="elem">this text is in
whitespace:pre</pre>
</div>
</div>
</body>
<script>
editingTest();
</script>
</html>
More information about the webkit-changes
mailing list