Rewrite and rebaseline smart copy paste tests to work on iOS and MacOS
https://bugs.webkit.org/show_bug.cgi?id=194175
Reviewed by Megan Gardner.
Using the functions committed in 194070 Ryosuke wrote, make the
smart copy paste tests run on both iOS and MacOS.
These tests will be turned on in 193786.
* editing/editing.js:
(runEditingTestWithCallbackLogging):
(runDumpAsTextEditingTest):
* editing/pasteboard/smart-paste-001.html:
* editing/pasteboard/smart-paste-002-expected.txt:
* editing/pasteboard/smart-paste-002.html:
* editing/pasteboard/smart-paste-003.html:
* editing/pasteboard/smart-paste-004.html:
* editing/pasteboard/smart-paste-005-expected.txt:
* editing/pasteboard/smart-paste-005.html:
* editing/pasteboard/smart-paste-006-expected.txt:
* editing/pasteboard/smart-paste-006.html:
* editing/pasteboard/smart-paste-007.html:
* editing/pasteboard/smart-paste-008.html:
* platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@240883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/editing/pasteboard/smart-paste-007.html b/LayoutTests/editing/pasteboard/smart-paste-007.html
index 8b7de9d..457409f 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-007.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-007.html
@@ -16,15 +16,13 @@
.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
.expected-results:first-line { font-weight: bold }
</style>
-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+<script src="../editing.js"></script>
+<script src="../../resources/ui-helper.js"></script>
<script>
-function editingTest() {
- var target = document.getElementById('test');
- var x = target.offsetLeft;
- var y = target.offsetTop + target.offsetHeight / 2;
- doubleClick(x, y);
+async function editingTest() {
+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test'));
cutCommand();
typeCharacterCommand('.');
typeCharacterCommand('.');