Changeset 293742 in webkit
- Timestamp:
- May 3, 2022, 3:10:46 PM (4 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
editing/spelling/inline-spelling-markers-hidpi.html (modified) (2 diffs)
-
editing/spelling/inline-spelling-markers.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r293741 r293742 1 2022-05-03 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [macOS] Make a couple of grammar checking tests more robust to system spell checker changes 4 https://bugs.webkit.org/show_bug.cgi?id=240034 5 rdar://92689657 6 7 Reviewed by Aditya Keerthi. 8 9 In some versions of macOS, feeding the following sentence to NSSpellChecker: 10 11 > "the the adlj adaasj sdklj. there there" 12 13 ...no longer yields grammar errors at "the the" and "there there", due to presence of duplicated "the" and 14 "there", which causes a couple of layout tests to time out. 15 16 This patch works around the system changes by swizzling out spell checking results, such that we don't need to 17 rely on the default NSSpellChecker always tagging "the the" and "there there" as grammar errors. 18 19 * editing/spelling/inline-spelling-markers-hidpi.html: 20 * editing/spelling/inline-spelling-markers.html: 21 1 22 2022-05-03 Truitt Savell <tsavell@apple.com> 2 23 -
trunk/LayoutTests/editing/spelling/inline-spelling-markers-hidpi.html
r164643 r293742 22 22 23 23 <body> 24 <script src="../../resources/js-test-pre.js"></script> 24 <script src="../../resources/ui-helper.js"></script> 25 <script src="../../resources/js-test.js"></script> 25 26 LTR 26 27 <div id="testLTR" class="testDiv" contenteditable="true"></div> … … 102 103 if (window.testRunner) { 103 104 testRunner.dumpAsText(true); 104 testRunner.setBackingScaleFactor(2, function () { 105 done(); 106 }); 105 UIHelper.setSpellCheckerResults({ 106 "the the adlj adaasj sdklj. there there\u00A0" : [ 107 { type : "spelling", from : 8, to : 12 }, 108 { type : "spelling", from : 13, to : 19 }, 109 { type : "spelling", from : 20, to : 25 }, 110 { 111 type : "grammar", 112 from : 4, 113 to : 7, 114 details : [{ from : 0, to : 3 }] 115 }, 116 { 117 type : "grammar", 118 from : 33, 119 to : 38, 120 details : [{ from : 0, to : 5 }] 121 } 122 ] 123 }).then(() => testRunner.setBackingScaleFactor(2, done)); 107 124 } 108 125 109 126 </script> 110 <script src="../../resources/js-test-post.js"></script>111 127 </body> 112 128 </html> -
trunk/LayoutTests/editing/spelling/inline-spelling-markers.html
r164643 r293742 22 22 23 23 <body> 24 <script src="../../resources/js-test-pre.js"></script> 24 <script src="../../resources/ui-helper.js"></script> 25 <script src="../../resources/js-test.js"></script> 25 26 LTR 26 27 <div id="testLTR" class="testDiv" contenteditable="true"></div> … … 107 108 finishJSTest(); 108 109 } 109 done(); 110 111 UIHelper.setSpellCheckerResults({ 112 "the the adlj adaasj sdklj. there there\u00A0" : [ 113 { type : "spelling", from : 8, to : 12 }, 114 { type : "spelling", from : 13, to : 19 }, 115 { type : "spelling", from : 20, to : 25 }, 116 { 117 type : "grammar", 118 from : 4, 119 to : 7, 120 details : [{ from : 0, to : 3 }] 121 }, 122 { 123 type : "grammar", 124 from : 33, 125 to : 38, 126 details : [{ from : 0, to : 5 }] 127 } 128 ] 129 }).then(done); 110 130 </script> 111 <script src="../../resources/js-test-post.js"></script>112 131 </body> 113 132 </html>
Note:
See TracChangeset
for help on using the changeset viewer.