Changeset 46926 in webkit
- Timestamp:
- Aug 7, 2009 4:25:57 PM (15 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 5 deleted
- 16 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r46925 r46926 1 2009-08-07 Darin Adler <darin@apple.com> 2 3 Reviewed by Adele Peterson. 4 5 "Shadow tree" DOM nodes are being accidentally exposed to JavaScript 6 https://bugs.webkit.org/show_bug.cgi?id=28086 7 8 Rewrite tests that depend on selection inside <input> and <textarea> elements 9 from showing up with getSelection(), since does not match Firefox and needs to 10 change soon. 11 12 * editing/deleting/delete-ligature-002-expected.txt: Updated. 13 * editing/deleting/delete-ligature-002.html: Changed to use a contenteditable 14 <div> element instead of a <textarea> element. 15 16 * editing/deleting/delete-ligature-003-expected.txt: Updated. 17 * editing/deleting/delete-ligature-003.html: Changed to use a contenteditable 18 <div> element instead of a <textarea> element. 19 20 * editing/deleting/skip-virama-001-expected.txt: Updated. 21 * editing/deleting/skip-virama-001.html: Changed to use a contenteditable 22 <div> element instead of a <textarea> element. 23 24 * editing/input/textarea-arrow-navigation-expected.txt: Moved to fast/forms. 25 * editing/input/textarea-arrow-navigation.html: Ditto. 26 27 * editing/inserting/insert-thai-characters-001-expected.txt: Updated. 28 * editing/inserting/insert-thai-characters-001.html: Changed to use a contenteditable 29 <div> element instead of a <textarea> element. 30 31 * editing/selection/5213963-expected.txt: Added. This is now a text-only test. 32 * editing/selection/5213963.html: Added a call to dumpAsText(). Changed selection 33 testing to use selectionEnd instead of getSelection().type. 34 35 * editing/selection/find-in-text-control-expected.txt: Updated. 36 * editing/selection/find-in-text-control.html: Changed test to distinguish the 37 different text controls. Made it use activeElement to find out if the selection 38 is inside a control. 39 40 * editing/selection/move-begin-end-expected.txt: Updated. 41 * editing/selection/move-begin-end.html: Changed to use a contenteditable 42 <div> element instead of a <textarea> element. 43 44 * editing/text-iterator/thai-cursor-movement-expected.txt: Updated. 45 * editing/text-iterator/thai-cursor-movement.html: Changed to use a contenteditable 46 <div> element instead of a <textarea> element. 47 48 * fast/forms/textarea-arrow-navigation-expected.txt: Moved from editing/input since 49 this is a <textarea> test, not a general editing test. 50 * fast/forms/textarea-arrow-navigation.html: Ditto. 51 Changed to use eventSender instead of the editing machinery to test the down arrow. 52 53 * platform/mac/editing/selection/5213963-expected.checksum: Removed. 54 This is now a text-only test. 55 * platform/mac/editing/selection/5213963-expected.png: Ditto. 56 * platform/mac/editing/selection/5213963-expected.txt: Ditto. 57 * platform/qt/editing/selection/5213963-expected.txt: Ditto. 58 * platform/win/editing/selection/5213963-expected.txt: Ditto. 59 1 60 2009-08-07 Drew Wilson <atwilson@google.com> 2 61 -
trunk/LayoutTests/editing/deleting/delete-ligature-002-expected.txt
r39169 r46926 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 1 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV to 0 of DIV toDOMRange:range from 1 of #text > DIV to 1 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 6 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 2 of #text > DIV to 2 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 7 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 9 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV to 2 of #text > DIV12 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 1 of #text > DIV to 1 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE12 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document 13 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 13 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 17 18 If this test succeeds, you can see "ว" (U+0E27) and a string "succeeded" below. 18 19 19 20 ว 20 21 Succeeded. -
trunk/LayoutTests/editing/deleting/delete-ligature-002.html
r39169 r46926 15 15 function editingTest() { 16 16 if (window.layoutTestController) 17 window.layoutTestController.dumpAsText();18 var te xtarea = document.getElementById("test");19 te xtarea.focus();17 layoutTestController.dumpAsText(); 18 var testarea = document.getElementById("test"); 19 testarea.focus(); 20 20 typeCharacterCommand(String.fromCharCode(0x0E27)); 21 21 typeCharacterCommand(String.fromCharCode(0x0E31)); … … 23 23 moveSelectionForwardByCharacterCommand(); 24 24 sendBackwardDeleteKey(); 25 if (te xtarea.value== "\u0E27")25 if (testarea.textContent == "\u0E27") 26 26 log("Succeeded."); 27 27 else 28 log("Failed. Actual: \"" + te xtarea.value+ "\", Expected: \"\u0E27\"");28 log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"\u0E27\""); 29 29 } 30 30 </script> … … 34 34 <p>This test tests whether the BackSpace key deletes only the last character of a ligature "วั".</p> 35 35 <p>If this test succeeds, you can see "ว" (U+0E27) and a string "succeeded" below.</p> 36 < textarea id="test" rows="1" cols="40"></textarea>36 <div id="test" contenteditable></div> 37 37 <ul id="console"></ul> 38 38 <script language="javascript" type="text/javascript"> -
trunk/LayoutTests/editing/deleting/delete-ligature-003-expected.txt
r39169 r46926 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 1 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV to 2 of #text > DIV 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 1 of #text > DIV to 1 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 8 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 1 of #text > DIV to 2 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 9 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 13 14 If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" below. 14 15 15 16 วั 16 17 Succeeded. -
trunk/LayoutTests/editing/deleting/delete-ligature-003.html
r39169 r46926 15 15 function editingTest() { 16 16 if (window.layoutTestController) 17 window.layoutTestController.dumpAsText();18 var te xtarea = document.getElementById("test");19 te xtarea.focus();17 layoutTestController.dumpAsText(); 18 var testarea = document.getElementById("test"); 19 testarea.focus(); 20 20 moveSelectionForwardByCharacterCommand(); 21 21 moveSelectionForwardByCharacterCommand(); 22 22 sendBackwardDeleteKey(); 23 23 execUndoCommand(); 24 if (te xtarea.value== "\u0E27\u0E31")24 if (testarea.textContent == "\u0E27\u0E31") 25 25 log("Succeeded."); 26 26 else 27 log("Failed. Actual: \"" + te xtarea.value + "\", Expected: \"\u0E27\u0E31\"");27 log("Failed. Actual: \"" + testarea.value + "\", Expected: \"\u0E27\u0E31\""); 28 28 } 29 29 </script> … … 33 33 <p>This test tests whether the undo command works when the BackSpace key deletes the last character of a ligature "วั".</p> 34 34 <p>If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" below.</p> 35 < textarea id="test" rows="1" cols="40">วั</textarea>35 <div id="test" contenteditable>วั</div> 36 36 <ul id="console"></ul> 37 37 <script language="javascript" type="text/javascript"> -
trunk/LayoutTests/editing/deleting/skip-virama-001-expected.txt
r41588 r46926 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 1 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV to 0 of DIV toDOMRange:range from 1 of #text > DIV to 1 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 6 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 2 of #text > DIV to 2 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 7 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV to 2 of #text > DIV toDOMRange:range from 3 of #text > DIV to 3 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 12 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 15 16 If this test succeeds, you can see a string "succeeded" below. 16 17 17 18 क्ष 18 19 Succeeded. -
trunk/LayoutTests/editing/deleting/skip-virama-001.html
r41588 r46926 17 17 function editingTest() { 18 18 if (window.layoutTestController) 19 window.layoutTestController.dumpAsText();20 var te xtarea = document.getElementById("test");21 te xtarea.focus();19 layoutTestController.dumpAsText(); 20 var testarea = document.getElementById("test"); 21 testarea.focus(); 22 22 typeCharacterCommand(String.fromCharCode(0x0915)); 23 23 typeCharacterCommand(String.fromCharCode(0x094D)); … … 26 26 sendBackwardDeleteKey(); 27 27 var expected_result = "\u0915\u094D\u0937"; 28 if (te xtarea.value== expected_result)28 if (testarea.textContent == expected_result) 29 29 log("Succeeded."); 30 30 else 31 log("Failed. Actual: \"" + te xtarea.value+ "\", Expected: \"" + expected_result + "\".");31 log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"" + expected_result + "\"."); 32 32 } 33 33 </script> … … 36 36 <p>This test tests whether or not we can prevent a cursor from moving after a virama sign.</p> 37 37 <p>If this test succeeds, you can see a string "succeeded" below.</p> 38 < textarea id="test" rows="1" cols="40"></textarea>38 <div contenteditable id="test"></div> 39 39 <ul id="console"></ul> 40 40 <script language="javascript" type="text/javascript"> -
trunk/LayoutTests/editing/inserting/insert-thai-characters-001-expected.txt
r41477 r46926 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 1 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV to 0 of DIV toDOMRange:range from 1 of #text > DIV to 1 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 6 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 2 of #text > DIV to 2 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 7 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV to 2 of #text > DIV toDOMRange:range from 3 of #text > DIV to 3 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 12 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 12 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV to 3 of #text > DIV toDOMRange:range from 4 of #text > DIV to 4 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE13 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 13 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 15 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV to 4 of #text > DIV toDOMRange:range from 5 of #text > DIV to 5 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE16 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 16 17 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 17 18 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 18 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV to 5 of #text > DIV toDOMRange:range from 6 of #text > DIV to 6 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE19 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 19 20 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 20 21 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 21 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV to 6 of #text > DIV toDOMRange:range from 7 of #text > DIV to 7 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE22 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 22 23 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 23 24 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 24 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV to 7 of #text > DIV toDOMRange:range from 8 of #text > DIV to 8 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE25 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 25 26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 26 27 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 27 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV to 8 of #text > DIV toDOMRange:range from 9 of #text > DIV to 9 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE28 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 28 29 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 29 30 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 30 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV to 9 of #text > DIV toDOMRange:range from 10 of #text > DIV to 10 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE31 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 31 32 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 32 33 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 33 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV to 10 of #text > DIV toDOMRange:range from 11 of #text > DIV to 11 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE34 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 34 35 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 35 36 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 37 38 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 38 39 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 39 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV to 4 of #text > DIV toDOMRange:range from 5 of #text > DIV to 5 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE40 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 40 41 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 41 42 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 42 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV to 5 of #text > DIV toDOMRange:range from 6 of #text > DIV to 6 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE43 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 43 44 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 44 45 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 47 48 If this test succeeds, you can see a string "succeeded" below. 48 49 49 50 อยากไปญี่ปุ่น 50 51 Succeeded. -
trunk/LayoutTests/editing/inserting/insert-thai-characters-001.html
r41477 r46926 12 12 function editingTest() { 13 13 if (window.layoutTestController) 14 window.layoutTestController.dumpAsText();15 var te xtarea = document.getElementById("test");16 te xtarea.focus();14 layoutTestController.dumpAsText(); 15 var testarea = document.getElementById("test"); 16 testarea.focus(); 17 17 typeCharacterCommand(String.fromCharCode(0x0E2D)); 18 18 typeCharacterCommand(String.fromCharCode(0x0E22)); … … 32 32 typeCharacterCommand(String.fromCharCode(0x0E1B)); 33 33 var expected_result = "\u0E2D\u0E22\u0E32\u0E01\u0E44\u0E1B\u0E0D\u0E35\u0E48\u0E1B\u0E38\u0E48\u0E19"; 34 if (te xtarea.value== expected_result)34 if (testarea.textContent == expected_result) 35 35 log("Succeeded."); 36 36 else 37 log("Failed. Actual: \"" + te xtarea.value + "\", Expected: \"" + expected_result + "\".");37 log("Failed. Actual: \"" + testarea.textContent.value + "\", Expected: \"" + expected_result + "\"."); 38 38 } 39 39 </script> … … 42 42 <p>This test tests whether we can insert a Thai character after a Thai "prepend" character.</p> 43 43 <p>If this test succeeds, you can see a string "succeeded" below.</p> 44 < textarea id="test" rows="1" cols="40"></textarea>44 <div contenteditable id="test"></div> 45 45 <ul id="console"></ul> 46 46 <script language="javascript" type="text/javascript"> -
trunk/LayoutTests/editing/selection/5213963.html
r21642 r46926 13 13 } 14 14 15 if (window.layoutTestController) 16 layoutTestController.dumpAsText(); 15 17 var input = document.getElementById("input"); 16 18 input.focus(); 17 19 input.setSelectionRange(0, input.value.length); 18 if (window.layoutTestController) { 19 if (window.getSelection().type == "None") 20 log("Failure: There was no selection inside the input field when the test began.") 20 if (!input.selectionEnd) 21 log("Failure: There was no selection inside the input field when the test began."); 22 if (!window.eventSender) 23 log("Test not run because there is no event sender."); 24 else { 21 25 var button = document.getElementById("button"); 22 26 var x = button.offsetParent.offsetLeft + button.offsetLeft + button.offsetWidth / 2; … … 25 29 eventSender.mouseDown(); 26 30 eventSender.mouseUp(); 27 if (window.getSelection().type != "None") 28 log("Failure: There was still a selection after clicking a button.") 31 if (!input.selectionEnd) 32 log("Failure: There was still a selection after clicking a button."); 33 log("Success"); 29 34 } 30 35 </script> -
trunk/LayoutTests/editing/selection/find-in-text-control-expected.txt
r44901 r46926 4 4 Target m matched at: 5 5 outer text node 1, at offset 9 6 text control, at offset 26 textarea, at offset 2 7 7 outer text node 2, at offset 3 8 8 outer text node 2, at offset 15 9 text control, at offset 29 input: text, at offset 2 10 10 outer text node 3, at offset 3 11 11 outer text node 3, at offset 15 12 text control, at offset 212 input: search, at offset 2 13 13 outer text node 4, at offset 3 14 14 outer text node 4, at offset 15 15 15 outer text node 5, at offset 3 16 16 Target s matched at: 17 text control, at offset 018 text control, at offset 1019 text control, at offset 020 text control, at offset 1021 text control, at offset 022 text control, at offset 1017 textarea, at offset 0 18 textarea, at offset 10 19 input: text, at offset 0 20 input: text, at offset 10 21 input: search, at offset 0 22 input: search, at offset 10 23 23 Target si matched at: 24 text control, at offset 1025 text control, at offset 1026 text control, at offset 1024 textarea, at offset 10 25 input: text, at offset 10 26 input: search, at offset 10 27 27 Target rem matched at: 28 28 outer text node 1, at offset 7 -
trunk/LayoutTests/editing/selection/find-in-text-control.html
r44901 r46926 4 4 <div id="div"> 5 5 Lorem ip<textarea id="textarea">sum dolor si</textarea>t amet 6 Lorem ip<input type="text" value="sum dolor si">t amet7 Lorem ip<input type="search" value="sum dolor si">t amet8 Lorem ip<input type="password" value="sum dolor si">t amet6 Lorem ip<input id="input: text" type="text" value="sum dolor si">t amet 7 Lorem ip<input id="input: search" type="search" value="sum dolor si">t amet 8 Lorem ip<input id="input: password" type="password" value="sum dolor si">t amet 9 9 </div> 10 10 <script> … … 13 13 14 14 var result = ""; 15 16 function elementIndex(node)17 {18 var index = 1;19 while (node = node.previousSibling) {20 if (node.nodeType == Node.ELEMENT_NODE)21 ++index;22 }23 return index;24 }25 15 26 16 function textNodeIndex(node) … … 34 24 } 35 25 26 function clearSelection() 27 { 28 getSelection().selectAllChildren(document.body); 29 getSelection().empty(); 30 } 31 32 function selectionLocationAsString() 33 { 34 if (document.activeElement.selectionStart != document.activeElement.selectionEnd) 35 return document.activeElement.id + ", at offset " + document.activeElement.selectionStart; 36 if (getSelection().rangeCount == 0) 37 return ""; 38 var range = getSelection().getRangeAt(0); 39 return "outer text node " + textNodeIndex(range.startContainer) + ", at offset " + range.startOffset; 40 } 41 36 42 function findAll(target) 37 43 { 44 var sel = getSelection(); 38 45 var ranges = []; 39 46 40 var sel = getSelection(); 41 sel.empty(); 47 clearSelection(); 42 48 document.execCommand("FindString", false, target); 43 if (!sel.rangeCount) { 49 50 var firstMatch = selectionLocationAsString(); 51 if (firstMatch == "") { 44 52 result += "Target " + target + " not matched\n"; 45 53 return; 46 54 } 47 var range = sel.getRangeAt(0); 48 while (!ranges[0] || range.startContainer != ranges[0].startContainer || range.startOffset != ranges[0].startOffset) { 49 ranges.push(range); 55 56 result += "Target " + target + " matched at:\n " + firstMatch + "\n"; 57 58 document.execCommand("FindString", false, target); 59 var match = selectionLocationAsString(); 60 while (match !== firstMatch) { 61 result += " " + match + "\n"; 50 62 document.execCommand("FindString", false, target); 51 range = sel.getRangeAt(0);63 match = selectionLocationAsString(); 52 64 } 53 sel.empty();54 65 55 var div = document.getElementById("div"); 56 result += "Target " + target + " matched at:\n"; 57 while (range = ranges.shift()) { 58 result += " "; 59 result += range.startContainer.parentNode != div ? "text control" : "outer text node " + textNodeIndex(range.startContainer); 60 result += ", at offset " + range.startOffset + "\n"; 61 } 66 clearSelection(); 62 67 } 63 68 -
trunk/LayoutTests/editing/selection/move-begin-end-expected.txt
r30635 r46926 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 8 of DIV > BODY > HTML > #document 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 1 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 0 of #text > DIV toDOMRange:range from 0 of #text > DIV to 0 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 0 of #text > DIV toDOMRange:range from 9 of #text > DIV to 9 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV to 9 of #text > DIV toDOMRange:range from 0 of #text > DIV to 0 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 0 of #text > DIV toDOMRange:range from 0 of #text > DIV to 9 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 9 of #text > DIV toDOMRange:range from 9 of #text > DIV to 9 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE11 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV to 9 of #text > DIV toDOMRange:range from 0 of #text > DIV to 9 of #text > DIVaffinity:NSSelectionAffinityDownstream stillSelecting:FALSE13 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 12 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 15 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 16 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 17 Some text 14 18 This tests that moving the caret and selecting using Command+Left/Right arrows work correctly. If this text is successful, the text "SUCCESS" will be shown below. 15 19 SUCCESS -
trunk/LayoutTests/editing/selection/move-begin-end.html
r29184 r46926 73 73 </head> 74 74 <body onload="runTest();"> 75 < textareaid="area">Some text</textarea>75 <div contenteditable id="area">Some text</textarea> 76 76 <div>This tests that moving the caret and selecting using Command+Left/Right arrows work correctly. If this text is successful, the text "SUCCESS" will be shown below.</div> 77 77 <div id="result">FAILURE</div> -
trunk/LayoutTests/editing/text-iterator/thai-cursor-movement-expected.txt
r46069 r46926 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 5 of DIV > BODY > HTML > #document 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 2 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification … … 15 16 Should say PASS: 16 17 17 18 อยากไปความ 18 19 PASS -
trunk/LayoutTests/editing/text-iterator/thai-cursor-movement.html
r46069 r46926 15 15 { 16 16 if (window.layoutTestController) 17 window.layoutTestController.dumpAsText();18 var textarea = document.getElementById("test");19 textarea.focus();17 layoutTestController.dumpAsText(); 18 var editableArea = document.getElementById("test"); 19 editableArea.focus(); 20 20 21 21 var i = 1; 22 for (; i <= textarea.textContent.length; ++i) {22 for (; i <= editableArea.firstChild.data.length; ++i) { 23 23 moveSelectionForwardByCharacterCommand(); 24 if ( window.getSelection().baseOffset != i) {24 if (getSelection().baseOffset != i) { 25 25 log("FAIL: " + i); 26 26 return; … … 35 35 <p>Test that moving insertion point over Thai text (without ligatures) always moves one character at a time.</p> 36 36 <p>Should say PASS:</p> 37 < textarea id="test" rows="1" cols="40">อยากไปความ</textarea>37 <div contenteditable id="test">อยากไปความ</textarea> 38 38 <ul id="console"></ul> 39 39 <script language="javascript" type="text/javascript"> -
trunk/LayoutTests/fast/forms/textarea-arrow-navigation-expected.txt
r46850 r46926 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification9 1 This tests that the cursor doesn't get 'stuck' when advancing through a text area with the down arrow key. See bug #19465 for more information 10 2 -
trunk/LayoutTests/fast/forms/textarea-arrow-navigation.html
r46850 r46926 1 1 <html> 2 2 <head> 3 <link rel=stylesheet href="../editingStyle.css" type="text/css">4 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>5 3 <script> 6 4 7 function log(str) { 5 function log(str) 6 { 8 7 var li = document.createElement("li"); 9 8 li.appendChild(document.createTextNode(str)); … … 12 11 } 13 12 14 function editingTest() { 13 function runTest() 14 { 15 15 if (window.layoutTestController) 16 window.layoutTestController.dumpAsText(); 16 layoutTestController.dumpAsText(); 17 18 if (!window.eventSender) 19 return; 17 20 18 21 var textarea = document.getElementById("test"); … … 23 26 textarea.setSelectionRange(5, 5); 24 27 for (var i = 0; i < 10; i++) { 25 // press the 'down arrow' a bunch of times to try to get to the end of 26 // the text area 27 moveSelectionForwardByLineCommand(); 28 // press the 'down arrow' a bunch of times to try to get to the end of the text area 29 eventSender.keyDown("downArrow"); 28 30 } 29 31 if (textarea.selectionStart != textarea.value.length) 30 log 32 log("Fail. Expected: selectionStart == " + textarea.value.length + ", Found: " + textarea.selectionStart); 31 33 else 32 34 log("Success"); … … 36 38 37 39 </head> 38 <body >40 <body onload="runTest()"> 39 41 <p> 40 42 This tests that the cursor doesn't get 'stuck' when advancing through a … … 52 54 53 55 <ul id="console"></ul> 54 <script>55 runEditingTest();56 </script>57 56 58 57 </body>
Note: See TracChangeset
for help on using the changeset viewer.