WebKit Bugzilla
Attachment 346610 Details for
Bug 188335
: [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188335-20180805200635.patch (text/plain), 25.04 KB, created by
Wenson Hsieh
on 2018-08-05 20:06:36 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-08-05 20:06:36 PDT
Size:
25.04 KB
patch
obsolete
>Subversion Revision: 234566 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 3e03d597471165c5f762faa30fa6ee0ba93fee90..aedbd85150e97fa67d9ce82b22581eb5b6c870b0 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,26 @@ >+2018-08-05 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+ >+ https://bugs.webkit.org/show_bug.cgi?id=188335 >+ <rdar://problem/32542437> and <rdar://problem/32542433> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove a UIScriptController helper method that attempted to wait for QuickType buttons to appear, and then send >+ touch events to the buttons. These were only used for the two tests which this patch refactors. See the >+ LayoutTests ChangeLog for more detail. >+ >+ * DumpRenderTree/ios/UIScriptControllerIOS.mm: >+ (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted. >+ * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: >+ * TestRunnerShared/UIScriptContext/UIScriptController.cpp: >+ (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted. >+ (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted. >+ * TestRunnerShared/UIScriptContext/UIScriptController.h: >+ * WebKitTestRunner/ios/UIScriptControllerIOS.mm: >+ (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted. >+ (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted. >+ > 2018-08-03 David Fenton <david_fenton@apple.com> > > Unreviewed, rolling out r234517. >diff --git a/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm b/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm >index b94ca8d831e540ebd4ba441569c74097c15b1de5..25f553aea98810fd3bb89bfd2141d4d3c116548e 100644 >--- a/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm >+++ b/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm >@@ -143,10 +143,6 @@ void UIScriptController::typeCharacterUsingHardwareKeyboard(JSStringRef characte > { > } > >-void UIScriptController::selectTextCandidateAtIndex(long, JSValueRef) >-{ >-} >- > void UIScriptController::keyDownUsingHardwareKeyboard(JSStringRef character, JSValueRef callback) > { > } >diff --git a/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl b/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl >index 809e475bc45f89f4af4b21cf02b097710a527663..823e43398ca6db82f4589a29faaeea55fe46c850 100644 >--- a/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl >+++ b/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl >@@ -63,8 +63,6 @@ interface UIScriptController { > void keyDownUsingHardwareKeyboard(DOMString character, object callback); > void keyUpUsingHardwareKeyboard(DOMString character, object callback); > >- void selectTextCandidateAtIndex(long index, object callback); >- > // eventsJSON describes a series of user events in JSON form. For the keys, see HIDEventGenerator.mm. > // For example, this JSON describes a touch down followed by a touch up (i.e. a single tap). > // { >diff --git a/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp b/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp >index 42c12cef1b7bbe24cf72605d30727b7d70cfef9c..94cf150b77f49604daa214460a6958414aa7ad85 100644 >--- a/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp >+++ b/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp >@@ -282,14 +282,6 @@ void UIScriptController::keyUpUsingHardwareKeyboard(JSStringRef, JSValueRef) > { > } > >-void UIScriptController::selectTextCandidateAtIndex(long, JSValueRef) >-{ >-} >- >-void UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex(long, unsigned, float) >-{ >-} >- > void UIScriptController::keyDownUsingHardwareKeyboard(JSStringRef, JSValueRef) > { > } >diff --git a/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h b/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h >index b2e1adeb839ffd3b2662a083728aa23f1012064c..6a13c1dbcc166a9e5e03916239df1bc6da06b94d 100644 >--- a/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h >+++ b/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h >@@ -89,8 +89,6 @@ public: > void keyDownUsingHardwareKeyboard(JSStringRef character, JSValueRef callback); > void keyUpUsingHardwareKeyboard(JSStringRef character, JSValueRef callback); > >- void selectTextCandidateAtIndex(long index, JSValueRef callback); >- > void keyboardAccessoryBarNext(); > void keyboardAccessoryBarPrevious(); > >@@ -205,7 +203,6 @@ private: > JSClassRef wrapperClass() final; > > JSObjectRef objectFromRect(const WebCore::FloatRect&) const; >- void waitForTextPredictionsViewAndSelectCandidateAtIndex(long index, unsigned callbackID, float interval); > > UIScriptContext* m_context; > }; >diff --git a/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm b/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm >index bd42d3aed4ed5a00ebd99d637342004126eed97c..1aad72dd371e8af584346d96a756fdc76b4dee52 100644 >--- a/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm >+++ b/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm >@@ -374,51 +374,6 @@ void UIScriptController::keyUpUsingHardwareKeyboard(JSStringRef character, JSVal > }]; > } > >-void UIScriptController::selectTextCandidateAtIndex(long index, JSValueRef callback) >-{ >-#if USE(APPLE_INTERNAL_SDK) >- static const float textPredictionsPollingInterval = 0.1; >- unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent); >- waitForTextPredictionsViewAndSelectCandidateAtIndex(index, callbackID, textPredictionsPollingInterval); >-#else >- // FIXME: This is a no-op on non-internal builds due to UIKeyboardPredictionView being unavailable. Ideally, there should be a better way to >- // retrieve information and interact with the predictive text view that will be compatible with OpenSource. >- UNUSED_PARAM(index); >- UNUSED_PARAM(callback); >-#endif >-} >- >-void UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex(long index, unsigned callbackID, float interval) >-{ >- id UIKeyboardPredictionViewClass = NSClassFromString(@"UIKeyboardPredictionView"); >- if (!UIKeyboardPredictionViewClass) >- return; >- >-#if USE(APPLE_INTERNAL_SDK) >- UIKeyboardPredictionView *predictionView = (UIKeyboardPredictionView *)[UIKeyboardPredictionViewClass activeInstance]; >- if (![predictionView hasPredictions]) { >- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, interval * NSEC_PER_SEC), dispatch_get_main_queue(), ^() { >- waitForTextPredictionsViewAndSelectCandidateAtIndex(index, callbackID, interval); >- }); >- return; >- } >- >- PlatformWKView webView = TestController::singleton().mainWebView()->platformView(); >- CGRect predictionViewFrame = [predictionView frame]; >- // This assumes there are 3 predicted text cells of equal width, which is the case on iOS. >- float offsetX = (index * 2 + 1) * CGRectGetWidth(predictionViewFrame) / 6; >- float offsetY = CGRectGetHeight(webView.window.frame) - CGRectGetHeight([[predictionView superview] frame]) + CGRectGetHeight(predictionViewFrame) / 2; >- [[HIDEventGenerator sharedHIDEventGenerator] tap:CGPointMake(offsetX, offsetY) completionBlock:^{ >- if (m_context) >- m_context->asyncTaskComplete(callbackID); >- }]; >-#else >- UNUSED_PARAM(index); >- UNUSED_PARAM(callbackID); >- UNUSED_PARAM(interval); >-#endif >-} >- > void UIScriptController::dismissFormAccessoryView() > { > TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 23404cef68bd856ac0d28794d0392fbf0ad98166..7e7af74ec527dbde1d05742de63fde928995c8ac 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,38 @@ >+2018-08-05 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+ >+ https://bugs.webkit.org/show_bug.cgi?id=188335 >+ <rdar://problem/32542437> and <rdar://problem/32542433> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Refactors a couple of tests that currently rely on the QuickType bar being shown when the hardware keyboard is >+ presented in the iOS simulator, so that it can insert text suggestions by tapping QuickType bar buttons; in the >+ first place, it was never guaranteed that this bar would show up, or even have more than 1 text suggestion. >+ Instead, we use the existing UIScriptController::applyAutocorrection method to trigger text replacement in the >+ same way tapping a button on the QuickType bar would replace the current word with the suggested word. >+ >+ * fast/events/ios/before-input-events-prevent-candidate-insertion-expected.txt: >+ * fast/events/ios/before-input-events-prevent-candidate-insertion.html: >+ * fast/events/ios/input-events-insert-replacement-text-expected.txt: >+ * fast/events/ios/input-events-insert-replacement-text.html: >+ * platform/ios/TestExpectations: >+ >+ Removes a [Timeout] expectation. >+ >+ * resources/ui-helper.js: >+ (window.UIHelper.typeCharacter): >+ >+ Add a new UIHelper method to type a character using the keyboard. Sends hardware keyboard events on the WebKit2 >+ port of iOS, and uses EventSender elsewhere. >+ >+ (window.UIHelper.applyAutocorrection): >+ >+ Add a new UIHelper method that wraps UIScriptController::applyAutocorrection. Only supported in WebKit2 >+ currently. >+ >+ (window.UIHelper): >+ > 2018-08-03 Justin Fan <justin_fan@apple.com> > > WebGL 2 conformance: vertex_arrays/vertex_array_object.html >diff --git a/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion-expected.txt b/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion-expected.txt >index 98d0c2e86c8e83cfd72d9f5ff89f05b2ff630012..22675e38eeeb7d88ec446c44ed8cf09c7eddc2d5 100644 >--- a/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion-expected.txt >+++ b/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion-expected.txt >@@ -1,5 +1,9 @@ > >-To manually test, type 't' into the contenteditable and try to select a candidate. The replacement text should not be inserted. >+This test verifies that beforeinput events of inputType "insertReplacementText" can be prevented. > >-PASS: The replacement text was prevented. >+To manually test, type 'T' into the text field and try to select a candidate. The replacement text should not be inserted. >+ >+Replacing "T" with "The"... >+Prevented "insertReplacementText" with data: "The" >+Does the input value contain replacement text? false > >diff --git a/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion.html b/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion.html >index b1af4902e738dd0cc56c33cfcd747cf90fa50b6c..98eeea7e9eaea20252c7a30dbb5793e0207b91b0 100644 >--- a/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion.html >+++ b/LayoutTests/fast/events/ios/before-input-events-prevent-candidate-insertion.html >@@ -1,92 +1,63 @@ > <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> > > <html> >- > <head> >- <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> >- <script id="ui-script" type="text/plain"> >- (function() { >- uiController.didShowKeyboardCallback = function() { >- uiController.typeCharacterUsingHardwareKeyboard("t", function() { >- uiController.selectTextCandidateAtIndex(1, function() { >- uiController.uiScriptComplete(); >- }); >- }); >- } >- uiController.singleTapAtPoint($x, $y, function() {}); >- })(); >- </script> >- >- <script> >- var progress = 0; >- var replacementText = ""; >- let write = (message) => output.innerHTML += (message + "<br>"); >- function getUIScript() { >- let rect = editable.getBoundingClientRect(); >- let script = document.getElementById("ui-script").text; >- script = script.replace("$x", rect.left + rect.width / 2); >- return script.replace("$y", rect.top + rect.height / 2); >- } >- >- if (window.testRunner) { >- testRunner.dumpAsText(); >- testRunner.waitUntilDone(); >- internals.settings.setInputEventsEnabled(true); >- } >- >- function incrementProgress() >- { >- progress++; >- if (!window.testRunner || progress !== 2) >- return; >- >- setTimeout(function() { >- if (editable.value.indexOf(replacementText) == -1) >- write(`PASS: The replacement text was prevented.`); >- else >- write(`FAIL: The input value ${editable.value} should not contain replacement text ${replacementText}.`); >- testRunner.notifyDone(); >- }, 0); >- } >- >- function runTest() >- { >- editable.addEventListener("beforeinput", preventBeforeInput); >- if (!window.testRunner || !testRunner.runUIScript) >- return; >- >- testRunner.runUIScript(getUIScript(), function(result) { >- incrementProgress(); >- }); >- } >- >- function preventBeforeInput(event) >- { >- if (event.inputType === "insertReplacementText") { >- replacementText = event.data; >- if (!replacementText) >- write("FAIL: The replacement text input event lacks data."); >- event.preventDefault(); >- incrementProgress(); >- } >- } >- >- </script> >- <style> >- #editable { >- width: 200px; >- height: 100px; >- top: 0; >- left: 0; >- position: absolute; >- } >- </style> >+<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> >+<script src="../../../resources/ui-helper.js"></script> >+<style> >+#editable { >+ width: 320px; >+ height: 320px; >+ top: 0; >+ left: 0; >+ position: absolute; >+} >+</style> > </head> > >-<body style="margin: 0;" onload=runTest()> >- <input contenteditable id="editable"></input> >- <p>To manually test, type 't' into the contenteditable and try to select a candidate. The replacement text should not be inserted.</p> >- <div id="output"></div> >+<body style="margin: 0;"> >+<input contenteditable id="editable"></input> >+<p>This test verifies that <code>beforeinput</code> events of inputType "insertReplacementText" can be prevented.</p> >+<p>To manually test, type 'T' into the text field and try to select a candidate. The replacement text should not be inserted.</p> >+<pre id="output"></pre> >+<script> >+let write = (message) => output.innerHTML += (message + "<br>"); >+ >+function checkForCompletion() { >+ doneCount = window.doneCount ? doneCount : 0; >+ if (++doneCount == 2 && window.testRunner) >+ testRunner.notifyDone(); >+} >+ >+function handleBeforeInput(event) { >+ if (event.inputType !== "insertReplacementText") >+ return; >+ >+ event.preventDefault(); >+ >+ write(`Prevented "insertReplacementText" with data: "${event.data}"`); >+ setTimeout(() => { >+ write(`Does the input value contain replacement text? ${editable.value.includes("The")}`); >+ checkForCompletion(); >+ }, 0); >+} >+ >+function triggerAutocorrectionAfterFirstInput() { >+ editable.removeEventListener("input", triggerAutocorrectionAfterFirstInput); >+ write(`Replacing "T" with "The"...`); >+ editable.setSelectionRange(0, 1); >+ UIHelper.applyAutocorrection("The", "T").then(checkForCompletion); >+} >+ >+if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+} >+ >+editable.addEventListener("beforeinput", handleBeforeInput); >+editable.addEventListener("input", triggerAutocorrectionAfterFirstInput); >+UIHelper.activateAndWaitForInputSessionAt(160, 160).then(() => UIHelper.typeCharacter("T")); >+</script> > </body> > > </html> >diff --git a/LayoutTests/fast/events/ios/input-events-insert-replacement-text-expected.txt b/LayoutTests/fast/events/ios/input-events-insert-replacement-text-expected.txt >index 9fa40f9f474082ddea180b1b82bd97e3c51949f1..1d28cba7f1f11ad0b6eb68a2059643f10b450014 100644 >--- a/LayoutTests/fast/events/ios/input-events-insert-replacement-text-expected.txt >+++ b/LayoutTests/fast/events/ios/input-events-insert-replacement-text-expected.txt >@@ -1,5 +1,9 @@ >-To manually test, type 't' into the contenteditable and try to select a candidate. The output should indicate that the beforeinput and input events for the text replacement were handled, and that the range of the beforeinput event is from 0 to 1. >+The >+This test verifies that input events of type "insertReplacementText" target the right ranges. > >-PASS: Handled text replacement before input event with range: [0, 1]. >-PASS: Handled text replacement input event. >+To manually test, type 'T' into the input field and try to select a candidate. The output should indicate that the beforeinput and input events for the text replacement were handled, and that the range of the beforeinput event is from 0 to 1. >+ >+Replacing "T" with "The"... >+Observed text replacement before input event with range: [0, 1] and data: "The" >+Observed text replacement input event with data: "The" > >diff --git a/LayoutTests/fast/events/ios/input-events-insert-replacement-text.html b/LayoutTests/fast/events/ios/input-events-insert-replacement-text.html >index 8ad9a774ec348398f89805194b925ad759f57659..1adc27fc99c362e510da9c7686898406eccfaea4 100644 >--- a/LayoutTests/fast/events/ios/input-events-insert-replacement-text.html >+++ b/LayoutTests/fast/events/ios/input-events-insert-replacement-text.html >@@ -1,90 +1,64 @@ > <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> > > <html> >- > <head> >- <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> >- <script id="ui-script" type="text/plain"> >- (function() { >- uiController.didShowKeyboardCallback = function() { >- uiController.typeCharacterUsingHardwareKeyboard("t", function() { >- uiController.selectTextCandidateAtIndex(1, function() { >- uiController.uiScriptComplete(); >- }); >- }); >- } >- uiController.singleTapAtPoint($x, $y, function() {}); >- })(); >- </script> >+<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> >+<script src="../../../resources/ui-helper.js"></script> >+<style> >+#editable { >+ width: 200px; >+ height: 200px; >+ top: 0; >+ left: 0; >+ position: absolute; >+} >+</style> >+</head> > >- <script> >- var progress = 0; >- let write = (message) => output.innerHTML += (message + "<br>"); >- function getUIScript() { >- let rect = editable.getBoundingClientRect(); >- let script = document.getElementById("ui-script").text; >- script = script.replace("$x", rect.left + rect.width / 2); >- return script.replace("$y", rect.top + rect.height / 2); >- } >+<body style="margin: 0;"> >+<div contenteditable id="editable"></div> >+<p>This test verifies that input events of type "insertReplacementText" target the right ranges.</p> >+<p>To manually test, type 'T' into the input field and try to select a candidate. The output should indicate that the beforeinput and input events for the text replacement were handled, and that the range of the beforeinput event is from 0 to 1.</p> >+<div id="output"></div> >+<script> >+let write = (message) => output.innerHTML += (message + "<br>"); > >- if (window.testRunner) { >- testRunner.dumpAsText(); >- testRunner.waitUntilDone(); >- internals.settings.setInputEventsEnabled(true); >- } >+function checkForCompletion() { >+ doneCount = window.doneCount ? doneCount : 0; >+ if (++doneCount == 3 && window.testRunner) >+ testRunner.notifyDone(); >+} > >- function incrementProgress() >- { >- progress++; >- if (!window.testRunner || progress !== 3) >- return; >+function logInputEvent(event) >+{ >+ if (event.inputType !== "insertReplacementText") >+ return; > >- setTimeout(function() { >- editable.textContent = ""; >- testRunner.notifyDone(); >- }, 0); >- } >+ if (event.type === "beforeinput") { >+ let firstRange = event.getTargetRanges()[0]; >+ write(`Observed text replacement before input event with range: [${firstRange.startOffset}, ${firstRange.endOffset}] and data: "${event.dataTransfer.getData("text/plain")}"`); >+ } else >+ write(`Observed text replacement input event with data: "${event.dataTransfer.getData("text/plain")}"`); > >- function runTest() >- { >- editable.addEventListener("input", logInputEvent); >- editable.addEventListener("beforeinput", logInputEvent); >- if (!window.testRunner || !testRunner.runUIScript) >- return; >+ checkForCompletion(); >+} > >- testRunner.runUIScript(getUIScript(), function(result) { >- incrementProgress(); >- }); >- } >+function triggerAutocorrectionAfterFirstInput() { >+ editable.removeEventListener("input", triggerAutocorrectionAfterFirstInput); >+ write(`Replacing "T" with "The"...`); >+ getSelection().setBaseAndExtent(editable, 0, editable, 1); >+ UIHelper.applyAutocorrection("The", "T").then(checkForCompletion); >+} > >- function logInputEvent(event) >- { >- if (event.inputType !== "insertReplacementText") >- return; >+if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+} > >- if (event.type === "beforeinput") { >- let firstRange = event.getTargetRanges()[0]; >- write(`PASS: Handled text replacement before input event with range: [${firstRange.startOffset}, ${firstRange.endOffset}].`); >- } else >- write(`PASS: Handled text replacement input event.`); >- incrementProgress(); >- } >- </script> >- <style> >- #editable { >- width: 200px; >- height: 200px; >- top: 0; >- left: 0; >- position: absolute; >- } >- </style> >-</head> >- >-<body style="margin: 0;" onload=runTest()> >- <div contenteditable id="editable"></div> >- <p>To manually test, type 't' into the contenteditable and try to select a candidate. The output should indicate that the beforeinput and input events for the text replacement were handled, and that the range of the beforeinput event is from 0 to 1.</p> >- <div id="output"></div> >+editable.addEventListener("beforeinput", logInputEvent); >+editable.addEventListener("input", logInputEvent); >+editable.addEventListener("input", triggerAutocorrectionAfterFirstInput); >+UIHelper.activateAndWaitForInputSessionAt(100, 100).then(() => UIHelper.typeCharacter("T")); >+</script> > </body> >- > </html> >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index b881ed004ec01727d1f518b93076e9f9cf48a032..36944fae98d49834b305454e8120d292029cd2d1 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -3078,9 +3078,6 @@ webkit.org/b/155092 js/arraybuffer-wrappers.html [ Pass Timeout ] > > webkit.org/b/172052 [ Release ] imported/w3c/web-platform-tests/html/webappapis/timers/type-long-setinterval.html [ Pass Failure ] > >-# <rdar://problem/32542437> REGRESSION (iOS 11): LayoutTest fast/events/ios/before-input-events-prevent-candidate-insertion.html is timing out >-fast/events/ios/before-input-events-prevent-candidate-insertion.html [ Timeout ] >- > # <rdar://problem/32542300> REGRESSION (iOS 11): LayoutTest fast/events/ios/contenteditable-autocapitalize.html is failing > fast/events/ios/contenteditable-autocapitalize.html [ Failure ] > >diff --git a/LayoutTests/resources/ui-helper.js b/LayoutTests/resources/ui-helper.js >index 40ad82d63defdd65b3bd734e65408281986c6db4..14f93e017ad3f67b747728e6127067b8a715f2ad 100644 >--- a/LayoutTests/resources/ui-helper.js >+++ b/LayoutTests/resources/ui-helper.js >@@ -246,4 +246,26 @@ window.UIHelper = class UIHelper { > })()`, resolve); > }); > } >+ >+ static typeCharacter(characterString) >+ { >+ if (!this.isWebKit2() || !this.isIOS()) { >+ eventSender.keyDown(key); >+ return; >+ } >+ >+ const escapedString = characterString.replace(/`/g, "\\`"); >+ const uiScript = `uiController.typeCharacterUsingHardwareKeyboard(\`${escapedString}\`, () => uiController.uiScriptComplete())`; >+ return new Promise(resolve => testRunner.runUIScript(uiScript, resolve)); >+ } >+ >+ static applyAutocorrection(newText, oldText) >+ { >+ if (!this.isWebKit2()) >+ return; >+ >+ const [escapedNewText, escapedOldText] = [newText.replace(/`/g, "\\`"), oldText.replace(/`/g, "\\`")]; >+ const uiScript = `uiController.applyAutocorrection(\`${escapedNewText}\`, \`${escapedOldText}\`, () => uiController.uiScriptComplete())`; >+ return new Promise(resolve => testRunner.runUIScript(uiScript, resolve)); >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188335
: 346610 |
346626