| <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true allowsLinkPreview=false ] --> |
| <html> |
| <head> |
| <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="../../../resources/ui-helper.js"></script> |
| <style> |
| html, body { |
| width: 100%; |
| margin: 0; |
| } |
| |
| #target { |
| font-size: 24px; |
| } |
| </style> |
| <script> |
| jsTestIsAsync = true; |
| |
| async function runTest() |
| { |
| description("This test verifies that it is possible to select text when link previews are disabled using WebKit API. This test requires WebKitTestRunner, since it exercises web view API to disable link previews."); |
| |
| await UIHelper.longPressElement(target); |
| shouldBeEqualToString("getSelection().toString()", "Testing"); |
| finishJSTest(); |
| } |
| </script> |
| <body onload="runTest()"> |
| <div id="target">Testing</div> |
| </body> |
| </html> |