Changeset 217292 in webkit
- Timestamp:
- May 23, 2017 1:23:23 PM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r217290 r217292 1 2017-05-23 Alexey Proskuryakov <ap@apple.com> 2 3 Many editing js-tests use waitUntilDone 4 https://bugs.webkit.org/show_bug.cgi?id=172401 5 6 Reviewed by Ryosuke Niwa. 7 8 Corrected the use of js-test harness, updated the tests to use js-test.js instead 9 of js-test-pre.js where possible. 10 11 * editing/caret/ios/absolute-caret-position-after-scroll.html: 12 * editing/caret/ios/fixed-caret-position-after-scroll.html: 13 * editing/input/style-change-during-input.html: 14 * editing/inserting/insert-html-crash.html: 15 * editing/mac/input/undo-grouping-on-text-insertion.html: 16 * editing/mac/selection/context-menu-select-editability-expected.txt: 17 * editing/mac/selection/context-menu-select-editability.html: 18 * editing/mac/spelling/accept-candidate-undo-does-not-select.html: 19 * editing/mac/spelling/autocorrection-respets-undo-expected.txt: 20 * editing/mac/spelling/autocorrection-respets-undo.html: 21 * editing/pasteboard/drag-and-drop-attachment-contenteditable.html: 22 * editing/pasteboard/drag-and-drop-image-contenteditable.html: 23 * editing/pasteboard/drag-and-drop-inputimage-contenteditable.html: 24 * editing/pasteboard/drag-and-drop-objectimage-contenteditable.html: 25 * editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt: 26 * editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html: 27 * editing/selection/ios/absolute-selection-after-scroll.html: 28 * editing/selection/ios/fixed-selection-after-scroll.html: 29 * editing/spelling/copy-paste-crash-expected.txt: 30 * editing/spelling/copy-paste-crash.html: 31 * editing/style/apply-style-join-child-text-nodes-crash.html: 32 1 33 2017-05-23 Jiewen Tan <jiewen_tan@apple.com> 2 34 -
trunk/LayoutTests/editing/caret/ios/absolute-caret-position-after-scroll.html
r209967 r217292 3 3 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 4 4 <head> 5 <script src="../../../resources/js-test -pre.js"></script>5 <script src="../../../resources/js-test.js"></script> 6 6 <style> 7 7 body { … … 23 23 </style> 24 24 <script> 25 if (window.testRunner) { 26 testRunner.dumpAsText(); 27 testRunner.waitUntilDone(); 28 } 25 jsTestIsAsync = true; 29 26 30 27 function tapInInputScript(tapX, tapY) … … 76 73 shouldBe("finalCaretRect.width", "initialCaretRect.width"); 77 74 shouldBe("finalCaretRect.height", "initialCaretRect.height"); 78 testRunner.notifyDone();75 finishJSTest(); 79 76 }); 80 77 }); … … 84 81 <body onload=run()> 85 82 <input></input> 86 <script src="../../../resources/js-test-post.js"></script>87 83 </body> 88 84 -
trunk/LayoutTests/editing/caret/ios/fixed-caret-position-after-scroll.html
r209967 r217292 3 3 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 4 4 <head> 5 <script src="../../../resources/js-test -pre.js"></script>5 <script src="../../../resources/js-test.js"></script> 6 6 <style> 7 7 body { … … 23 23 </style> 24 24 <script> 25 if (window.testRunner) { 26 testRunner.dumpAsText(); 27 testRunner.waitUntilDone(); 28 } 25 jsTestIsAsync = true; 29 26 30 27 function getInputViewBoundsAfterTappingInInputScript(tapX, tapY) … … 71 68 window.finalCaretRect = finalCaretRect = JSON.parse(finalCaretRect); 72 69 shouldBe("finalCaretRect.top - initialCaretRect.top", "500"); 73 testRunner.notifyDone();70 finishJSTest(); 74 71 }); 75 72 }); … … 80 77 <body onload=run()> 81 78 <input id="input"></input> 82 <script src="../../../resources/js-test-post.js"></script>83 79 </body> 84 80 -
trunk/LayoutTests/editing/input/style-change-during-input.html
r155276 r217292 1 1 <html> 2 2 <head> 3 <script src="../../resources/js-test -pre.js"></script>3 <script src="../../resources/js-test.js"></script> 4 4 <style> 5 5 body[style] { } … … 13 13 document.getElementById("target").addEventListener("textInput", function (evt) { evt.target.style.width = 100; }); 14 14 if (window.testRunner) { 15 testRunner.dumpAsText();16 testRunner.waitUntilDone();17 15 window.target = document.getElementById("target"); 18 16 window.setTimeout(function() { … … 30 28 window.jsTestIsAsync = true; 31 29 </script> 32 <script src="../../resources/js-test-post.js"></script>33 30 </body> 34 31 </html> -
trunk/LayoutTests/editing/inserting/insert-html-crash.html
r155276 r217292 1 1 <!DOCTYPE html> 2 2 <html> 3 <script src="../../resources/js-test -pre.js"></script>3 <script src="../../resources/js-test.js"></script> 4 4 <script> 5 5 window.jsTestIsAsync = true; 6 7 if (window.testRunner)8 testRunner.waitUntilDone();9 6 10 7 document.addEventListener("DOMCharacterDataModified", function() { … … 19 16 document.execCommand("InsertHTML", false, 4); 20 17 </script> 21 <script src="../../resources/js-test-post.js"></script>22 18 </html> -
trunk/LayoutTests/editing/mac/input/undo-grouping-on-text-insertion.html
r187932 r217292 1 1 <html> 2 2 <head> 3 <script src="../../../resources/js-test -pre.js"></script>3 <script src="../../../resources/js-test.js"></script> 4 4 <style> 5 5 body { margin: 0; padding: 0 } … … 13 13 14 14 description("When inserting text with the undo insertion attribute, each blob of inserted text should create an undo group so that, sending an undo command will undo just that last text insertion."); 15 var jsTestIsAsync = true; 16 window.jsTestIsAsync = true; 17 testRunner.waitUntilDone(); 15 jsTestIsAsync = true; 18 16 19 17 var undoCount = 0; … … 32 30 document.execCommand("Undo"); 33 31 undoCount++; 34 if (undoCount == 4) { 35 testRunner.notifyDone(); 32 if (undoCount == 4) 36 33 finishJSTest(); 37 } else {34 else 38 35 setTimeout("undoNow()", 1); 39 }40 36 } 41 37 -
trunk/LayoutTests/editing/mac/selection/context-menu-select-editability-expected.txt
r187932 r217292 4 4 The crowd says: New York, New York is a helluva town! 5 5 6 7 8 PASS successfullyParsed is true9 10 TEST COMPLETE11 6 12 7 -
trunk/LayoutTests/editing/mac/selection/context-menu-select-editability.html
r187932 r217292 2 2 <html> 3 3 <head> 4 <script src="../../../resources/js-test -pre.js"></script>4 <script src="../../../resources/js-test.js"></script> 5 5 </head> 6 6 <body onload="onLoad()"> … … 14 14 </div> 15 15 <div id="console"> 16 </body>17 16 <script> 18 17 … … 40 39 function onLoad() 41 40 { 42 if (window.testRunner) { 43 window.jsTestIsAsync = true; 44 testRunner.waitUntilDone(); 45 } 41 jsTestIsAsync = true; 46 42 47 43 setTimeout(performTest, 500); // Wait for page to display 48 44 } 49 45 </script> 50 <script src="../../../resources/js-test-post.js"></script>51 46 </body> 52 47 </html> -
trunk/LayoutTests/editing/mac/spelling/accept-candidate-undo-does-not-select.html
r205870 r217292 2 2 <head> 3 3 <script src=../../editing.js></script> 4 <script src="../../../resources/js-test -pre.js"></script>4 <script src="../../../resources/js-test.js"></script> 5 5 <script> 6 6 7 7 function editingTest() { 8 if (window.testRunner) { 9 testRunner.waitUntilDone(); 10 testRunner.dumpAsText(true); 11 } 8 jsTestIsAsync = true; 12 9 13 10 edit = document.getElementById('edit'); … … 34 31 typeCharacterCommand('.'); 35 32 36 testRunner.notifyDone();33 finishJSTest(); 37 34 }, 100); 38 35 } … … 48 45 runEditingTest(); 49 46 </script> 50 <script src="../../../resources/js-test-post.js"></script>51 47 </body> 52 48 </html> -
trunk/LayoutTests/editing/mac/spelling/autocorrection-respets-undo-expected.txt
r187932 r217292 1 PASS editor.innerText is 'wellcome '2 1 Test that undoing autocorrection from "wellcome" to "welcome" and typing a space doesn't re-autocorrect "wellcome". 3 2 To manually test, type "testt " and observe that it's auto-corrected to "test ". Then undo the auto-correction and type a space again. You should see "testt ". 4 3 5 4 wellcome 5 PASS editor.innerText is 'wellcome ' 6 PASS successfullyParsed is true 7 8 TEST COMPLETE 9 -
trunk/LayoutTests/editing/mac/spelling/autocorrection-respets-undo.html
r187932 r217292 5 5 To manually test, type "testt " and observe that it's auto-corrected to "test ". Then undo the auto-correction and type a space again. You should see "testt ".</p> 6 6 <div id="editor" contenteditable></div> 7 <script src="../../../resources/js-test-pre.js"></script> 7 <div id="console"></div> 8 <script src="../../../resources/js-test.js"></script> 8 9 <script> 9 10 10 11 if (window.testRunner) { 11 testRunner.dumpAsText(); 12 testRunner.waitUntilDone(); 12 jsTestIsAsync = true; 13 13 14 14 var editor = document.getElementById('editor'); … … 22 22 document.execCommand('insertText', false, ' '); 23 23 shouldBe("editor.innerText", "'wellcome\xa0'"); 24 if (window.testRunner) 25 testRunner.notifyDone(); 24 finishJSTest(); 26 25 }, 100); // The delay is needed to separate the autocorrection from typing "wellcome" in NSUndoManager. 27 26 } 28 29 27 </script> 30 28 </body> -
trunk/LayoutTests/editing/pasteboard/drag-and-drop-attachment-contenteditable.html
r198088 r217292 6 6 window.internals.settings.setAttachmentElementEnabled(true) 7 7 </script> 8 <script src="../../resources/js-test -pre.js"></script>8 <script src="../../resources/js-test.js"></script> 9 9 <style> 10 10 #target { … … 44 44 if (!window.testRunner) 45 45 return; 46 47 testRunner.waitUntilDone();48 46 49 47 e = document.getElementById("attachment"); … … 62 60 } 63 61 </script> 64 <script src="../../resources/js-test-post.js"></script>65 62 </body> 66 63 </html> -
trunk/LayoutTests/editing/pasteboard/drag-and-drop-image-contenteditable.html
r155276 r217292 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test -pre.js"></script>4 <script src="../../resources/js-test.js"></script> 5 5 <style> 6 6 #target { … … 38 38 return; 39 39 40 testRunner.waitUntilDone();41 42 40 e = document.getElementById("source"); 43 41 x = e.offsetLeft + e.offsetWidth / 2; … … 55 53 } 56 54 </script> 57 <script src="../../resources/js-test-post.js"></script>58 55 </body> 59 56 </html> -
trunk/LayoutTests/editing/pasteboard/drag-and-drop-inputimage-contenteditable.html
r155276 r217292 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test -pre.js"></script>4 <script src="../../resources/js-test.js"></script> 5 5 <style> 6 6 #target { … … 39 39 return; 40 40 41 testRunner.waitUntilDone();42 43 41 e = document.getElementById("source"); 44 42 x = e.offsetLeft + e.offsetWidth / 2; … … 56 54 } 57 55 </script> 58 <script src="../../resources/js-test-post.js"></script>59 56 </body> 60 57 </html> -
trunk/LayoutTests/editing/pasteboard/drag-and-drop-objectimage-contenteditable.html
r155276 r217292 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test -pre.js"></script>4 <script src="../../resources/js-test.js"></script> 5 5 <style> 6 6 #target { … … 39 39 return; 40 40 41 testRunner.waitUntilDone();42 43 41 e = document.getElementById("source"); 44 42 x = e.offsetLeft + e.offsetWidth / 2; … … 56 54 } 57 55 </script> 58 <script src="../../resources/js-test-post.js"></script>59 56 </body> 60 57 </html> -
trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt
r208576 r217292 1 PASS 'javascript:alert('Set by data transfer');' was set in the data transfer for firstAnchorSource and not overwritten.2 PASS 'http://webkit.org/setByDataTransfer' was set in the data transfer for secondAnchorSource and not overwritten.3 PASS 'javascript:alert('Set by data transfer');' was set in the data transfer for firstSvgSource and not overwritten.4 PASS 'http://webkit.org/setByDataTransfer' was set in the data transfer for secondSvgSource and not overwritten.5 1 6 2 This only has an ondragenter handler and is here to make sure dragging over it doesn't change the pasteboard. … … 12 8 https://webkit.org 13 9 10 PASS 'javascript:alert('Set by data transfer');' was set in the data transfer for firstAnchorSource and not overwritten. 11 PASS 'http://webkit.org/setByDataTransfer' was set in the data transfer for secondAnchorSource and not overwritten. 12 PASS 'javascript:alert('Set by data transfer');' was set in the data transfer for firstSvgSource and not overwritten. 13 PASS 'http://webkit.org/setByDataTransfer' was set in the data transfer for secondSvgSource and not overwritten. 14 PASS successfullyParsed is true 14 15 16 TEST COMPLETE 17 -
trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html
r216466 r217292 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test -pre.js"></script>4 <script src="../../resources/js-test.js"></script> 5 5 </head> 6 6 <body> … … 58 58 59 59 --> 60 <div id="console"></div> 60 61 <script> 61 62 var TEXT_TO_SET_IN_DATA_TRANSFER = "javascript:alert('Set by data transfer');"; … … 119 120 120 121 if (window.testRunner && eventSender) { 121 testRunner.dumpAsText(); 122 testRunner.waitUntilDone(); 122 jsTestIsAsync = true; 123 123 124 124 dragAndDropElement("firstAnchorSource"); … … 138 138 }); 139 139 140 testRunner.notifyDone();140 finishJSTest(); 141 141 } 142 142 </script> -
trunk/LayoutTests/editing/selection/ios/absolute-selection-after-scroll.html
r209967 r217292 3 3 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 4 4 <head> 5 <script src="../../../resources/js-test -pre.js"></script>5 <script src="../../../resources/js-test.js"></script> 6 6 <style> 7 7 body { … … 24 24 </style> 25 25 <script> 26 if (window.testRunner) { 27 testRunner.dumpAsText(); 28 testRunner.waitUntilDone(); 29 } 26 jsTestIsAsync = true; 30 27 31 28 function toString(rect) … … 82 79 shouldBe("finalSelectionRects[0].width", "initialSelectionRects[0].width"); 83 80 shouldBe("finalSelectionRects[0].height", "initialSelectionRects[0].height"); 84 testRunner.notifyDone();81 finishJSTest(); 85 82 }); 86 83 }); … … 91 88 <div id="fixed">WebKit</div> 92 89 <div id="content"></div> 93 <script src="../../../resources/js-test-post.js"></script>94 90 </body> 95 91 </html> -
trunk/LayoutTests/editing/selection/ios/fixed-selection-after-scroll.html
r209967 r217292 3 3 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 4 4 <head> 5 <script src="../../../resources/js-test -pre.js"></script>5 <script src="../../../resources/js-test.js"></script> 6 6 <style> 7 7 body { … … 24 24 </style> 25 25 <script> 26 if (window.testRunner) { 27 testRunner.dumpAsText(); 28 testRunner.waitUntilDone(); 29 } 26 jsTestIsAsync = true; 30 27 31 28 function toString(rect) … … 81 78 shouldBe("finalSelectionRects.length", "1"); 82 79 shouldBe("finalSelectionRects[0].top - initialSelectionRects[0].top", "1000"); 83 testRunner.notifyDone();80 finishJSTest(); 84 81 }); 85 82 }); … … 90 87 <div id="fixed">WebKit</div> 91 88 <div id="content"></div> 92 <script src="../../../resources/js-test-post.js"></script>93 89 </body> 94 90 </html> -
trunk/LayoutTests/editing/spelling/copy-paste-crash-expected.txt
r203249 r217292 1 1 Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN. To test manually, type 'A', Ctrl-A, Ctrl-X, Ctrl-V, and start typing again. The test succeeds when there's no crash in the last step. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 2 Spell wellcome. Is it broken?A simple test for a spell check.AA 6 3 PASS internals.markerCountForNode(destination.childNodes[0], "spelling") became different from 0 7 4 PASS Did not crash 8 Spell wellcome. Is it broken?A simple test for a spell check.AA 5 PASS successfullyParsed is true 9 6 7 TEST COMPLETE 8 -
trunk/LayoutTests/editing/spelling/copy-paste-crash.html
r203249 r217292 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test -pre.js"></script>4 <script src="../../resources/js-test.js"></script> 5 5 <script src="resources/util.js"></script> 6 6 </head> 7 7 <body> 8 <div>Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN. To test manually, type 'A', Ctrl-A, Ctrl-X, Ctrl-V, and start typing again. The test succeeds when there's no crash in the last step.</div> 8 9 <div id="container"> 9 10 <div id="destination" contentEditable> … … 11 12 </div> 12 13 </div> 14 <div id="console"></div> 13 15 <script> 14 if (window.testRunner) 15 testRunner.waitUntilDone(); 16 17 description("Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN. " 18 + "To test manually, type 'A', Ctrl-A, Ctrl-X, Ctrl-V, and start typing again. " 19 + "The test succeeds when there's no crash in the last step."); 20 21 initSpellTest("destination", "Spell wellcome. Is it broken?", function(textNode) { 16 onload = initSpellTest("destination", "Spell wellcome. Is it broken?", function(textNode) { 22 17 var behaviors = ["win", "mac"]; 23 18 for (var i = 0; i < behaviors.length; i++) { … … 29 24 } 30 25 31 log("PASS Did not crash"); 32 if (window.testRunner) 33 testRunner.notifyDone(); 26 testPassed("Did not crash"); 27 finishJSTest(); 34 28 }); 35 29 </script> 36 <div id="console"></div>37 <script src="../../resources/js-test-post.js"></script>38 30 </body> 39 31 </html> -
trunk/LayoutTests/editing/style/apply-style-join-child-text-nodes-crash.html
r155276 r217292 2 2 <html> 3 3 <body> 4 <script src="../../resources/js-test -pre.js"></script>4 <script src="../../resources/js-test.js"></script> 5 5 <script id="script1"> 6 6 document.addEventListener("DOMCharacterDataModified",function(){ … … 13 13 window.jsTestIsAsync = true; 14 14 15 if (window.testRunner)16 testRunner.waitUntilDone();17 18 15 var scriptElement = document.getElementById('script1'); 19 16 scriptElement.parentNode.appendChild(scriptElement.firstChild); … … 23 20 document.execCommand("FontSizeDelta", false, 3); 24 21 </script> 25 <script src="../../resources/js-test-post.js"></script>26 22 </body> 27 23 </html>
Note: See TracChangeset
for help on using the changeset viewer.