Commit 51a04f82 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Center long press WKebView links for egtests.

EarlGrey doesn't natively support tapping on links within WKWebView, and the
long press implementation hack used doesn't work well with links near the edge
of the page when allowsBackForwardNavigationGestures is enabled.  As this is a
test only issue, a simple fix is to just center the items being long pressed.

Tbr: eugenebut
Bug: 910375
Change-Id: Ibb7079b22e1ce1d8baa52f0205be038dfec9d2c4
Reviewed-on: https://chromium-review.googlesource.com/c/1356034
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612571}
parent 590d48f9
...@@ -60,7 +60,7 @@ const char kDestinationPageUrl[] = "/destination"; ...@@ -60,7 +60,7 @@ const char kDestinationPageUrl[] = "/destination";
// HTML content of the destination page. // HTML content of the destination page.
const char kDestinationHtml[] = const char kDestinationHtml[] =
"<html><body><script>document.title='new doc'</script>" "<html><body><script>document.title='new doc'</script>"
"<span id=\"message\">You made it!</span>" "<center><span id=\"message\">You made it!</span></center>"
"</body></html>"; "</body></html>";
// The DOM element ID of the message on the destination page. // The DOM element ID of the message on the destination page.
const char kDestinationPageTextId[] = "message"; const char kDestinationPageTextId[] = "message";
......
...@@ -9,7 +9,9 @@ renderer-initiated navigation. --> ...@@ -9,7 +9,9 @@ renderer-initiated navigation. -->
<html> <html>
<body> <body>
<a href="pony.html" id="normal-link">Normal Link</a> <center>
<a href="#samePage" id="same-page-link">Same-page Link</a> <a href="pony.html" id="normal-link">Normal Link</a>
<a href="#samePage" id="same-page-link">Same-page Link</a>
</center>
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment