aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYuntaek Rim <yuntaek.rim@myscript.com>2018-01-17 23:06:25 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-08-16 07:16:05 +0000
commit481efaf80d93f2711e23c479312db4541602c6ef (patch)
tree58acc1699add3b3b90c7a607dd32cfd02879a104 /tests
parent246c406fc2bad945284704bb6613ae9adf3230ed (diff)
myscript: initial integration
[ChangeLog][MyScript] Added support for MyScript handwriting. Change-Id: I7c1f41dfd7ddd25faf2d197652ba04d3d7e12941 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml9
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml8
-rw-r--r--tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js854
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml116
-rw-r--r--tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt208
-rw-r--r--tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt46
-rw-r--r--tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt276
7 files changed, 837 insertions, 680 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml b/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml
index 692116d0..aa7ae714 100644
--- a/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml
@@ -38,6 +38,7 @@ HandwritingInputPanel {
z: 99
property var testcase
+ readonly property var inputMethod: InputContext.inputEngine.inputMethod
readonly property var wordCandidatePopupList: Utils.findChildByProperty(handwritingInputPanel, "objectName", "wordCandidatePopupList", null)
anchors.fill: parent
@@ -129,7 +130,15 @@ HandwritingInputPanel {
console.warn("Cannot produce the symbol '%1' in full screen handwriting mode".arg(ch))
return false
}
+ if (isSuperimposedHandwriting())
+ return true;
inputMethodResultSpy.wait(3000)
return inputMethodResultSpy.count > 0
}
+
+ function isSuperimposedHandwriting() {
+ if (!available)
+ return false
+ return inputMethod != null && inputMethod.hasOwnProperty("superimposed") && inputMethod.superimposed;
+ }
}
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index 6a5ae429..68945c2e 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -600,7 +600,15 @@ InputPanel {
console.warn("Cannot produce the symbol '%1' in handwriting mode".arg(ch))
return false
}
+ if (isSuperimposedHandwriting())
+ return true
inputMethodResultSpy.wait(3000)
return inputMethodResultSpy.count > 0
}
+
+ function isSuperimposedHandwriting() {
+ if (!inputPanel.keyboard.handwritingMode)
+ return false
+ return inputMethod != null && inputMethod.hasOwnProperty("superimposed") && inputMethod.superimposed
+ }
}
diff --git a/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js b/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js
index 1b487c49..db30adda 100644
--- a/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js
+++ b/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
@@ -38,528 +38,528 @@ var unipenData = {
".PEN": [
[
[
- 379,
+ 344,
53,
0
],
[
- 380,
+ 345,
53,
155
],
[
- 382,
+ 347,
53,
177
],
[
- 385,
+ 350,
53,
179
],
[
- 391,
+ 356,
53,
243
],
[
- 400,
+ 365,
53,
244
],
[
- 421,
+ 386,
55,
311
],
[
- 437,
+ 402,
55,
313
],
[
- 441,
+ 406,
55,
315
],
[
- 448,
+ 413,
55,
365
],
[
- 454,
+ 419,
55,
366
],
[
- 461,
+ 426,
55,
370
],
[
- 467,
+ 432,
54,
426
],
[
- 472,
+ 437,
54,
427
],
[
- 475,
+ 440,
54,
486
],
[
- 477,
+ 442,
54,
487
],
[
- 478,
+ 443,
54,
490
],
[
- 479,
+ 444,
54,
548
],
[
- 480,
+ 445,
54,
549
],
[
- 482,
+ 447,
54,
610
],
[
- 485,
+ 450,
54,
610
],
[
- 488,
+ 453,
54,
670
],
[
- 489,
+ 454,
54,
731
],
[
- 489,
+ 454,
55,
939
],
[
- 489,
+ 454,
56,
1003
],
[
- 489,
+ 454,
60,
1004
],
[
- 489,
+ 454,
64,
1064
],
[
- 489,
+ 454,
66,
1065
],
[
- 489,
+ 454,
72,
1124
],
[
- 489,
+ 454,
75,
1125
],
[
- 489,
+ 454,
79,
1131
],
[
- 489,
+ 454,
81,
1184
],
[
- 489,
+ 454,
86,
1185
],
[
- 489,
+ 454,
91,
1245
],
[
- 489,
+ 454,
92,
1246
],
[
- 489,
+ 454,
97,
1306
],
[
- 489,
+ 454,
99,
1307
],
[
- 489,
+ 454,
101,
1366
],
[
- 489,
+ 454,
102,
1367
],
[
- 489,
+ 454,
103,
1427
],
[
- 489,
+ 454,
105,
1429
],
[
- 489,
+ 454,
106,
1500
],
[
- 489,
+ 454,
107,
1549
],
[
- 489,
+ 454,
108,
1550
],
[
- 489,
+ 454,
109,
1614
]
],
[
[
- 383,
+ 348,
113,
2999
],
[
- 384,
+ 349,
113,
3259
],
[
- 385,
+ 350,
112,
3291
],
[
- 386,
+ 351,
112,
3360
],
[
- 399,
+ 364,
112,
3361
],
[
- 412,
+ 377,
112,
3389
],
[
- 434,
+ 399,
112,
3449
],
[
- 440,
+ 405,
112,
3450
],
[
- 451,
+ 416,
112,
3451
],
[
- 455,
+ 420,
112,
3510
],
[
- 479,
+ 444,
111,
3511
],
[
- 493,
+ 458,
110,
3574
],
[
- 506,
+ 471,
109,
3576
],
[
- 513,
+ 478,
109,
3632
],
[
- 515,
+ 480,
109,
3633
],
[
- 516,
+ 481,
109,
3636
]
],
[
[
- 430,
+ 395,
115,
5767
],
[
- 430,
+ 395,
116,
5851
],
[
- 432,
+ 397,
120,
5884
],
[
- 433,
+ 398,
123,
5937
],
[
- 433,
+ 398,
127,
5938
],
[
- 434,
+ 399,
130,
6000
],
[
- 434,
+ 399,
133,
6002
],
[
- 435,
+ 400,
139,
6058
],
[
- 435,
+ 400,
141,
6059
],
[
- 435,
+ 400,
142,
6124
],
[
- 435,
+ 400,
143,
6523
]
],
[
[
- 393,
+ 358,
151,
7943
],
[
- 394,
+ 359,
151,
8099
],
[
- 399,
+ 364,
150,
8124
],
[
- 412,
+ 377,
150,
8184
],
[
- 422,
+ 387,
150,
8185
],
[
- 438,
+ 403,
150,
8245
],
[
- 448,
+ 413,
150,
8246
],
[
- 465,
+ 430,
149,
8305
],
[
- 478,
+ 443,
149,
8306
],
[
- 485,
+ 450,
149,
8366
],
[
- 487,
+ 452,
149,
8366
],
[
- 488,
+ 453,
149,
8432
],
[
- 489,
+ 454,
149,
8490
],
[
- 491,
+ 456,
149,
8492
],
[
- 492,
+ 457,
149,
8549
],
[
- 492,
+ 457,
150,
8835
],
[
- 492,
+ 457,
152,
8882
],
[
- 492,
+ 457,
155,
8883
],
[
- 492,
+ 457,
159,
8944
],
[
- 492,
+ 457,
163,
8945
],
[
- 492,
+ 457,
168,
9005
],
[
- 491,
+ 456,
173,
9005
],
[
- 491,
+ 456,
177,
9067
],
[
- 490,
+ 455,
182,
9068
],
[
- 490,
+ 455,
188,
9126
],
[
- 490,
+ 455,
192,
9126
],
[
- 490,
+ 455,
193,
9130
],
[
- 490,
+ 455,
196,
9188
],
[
- 490,
+ 455,
198,
9247
],
[
- 490,
+ 455,
200,
9247
],
[
- 490,
+ 455,
202,
9307
],
[
- 490,
+ 455,
203,
9308
]
@@ -871,108 +871,128 @@ var unipenData = {
],
[
625,
- 120,
- 3236
+ 121,
+ 3096
+ ],
+ [
+ 626,
+ 121,
+ 3155
+ ],
+ [
+ 628,
+ 121,
+ 3199
+ ],
+ [
+ 629,
+ 121,
+ 3254
+ ],
+ [
+ 631,
+ 121,
+ 3310
]
],
[
[
- 614,
+ 626,
42,
3848
],
[
- 614,
+ 626,
45,
3896
],
[
- 614,
+ 626,
47,
3897
],
[
- 614,
+ 626,
54,
3900
],
[
- 615,
+ 627,
63,
3958
],
[
- 617,
+ 629,
76,
3958
],
[
- 619,
+ 631,
92,
4017
],
[
- 620,
+ 632,
100,
4018
],
[
- 620,
+ 632,
115,
4078
],
[
- 620,
+ 632,
133,
4079
],
[
- 618,
+ 630,
141,
4084
],
[
- 616,
+ 628,
153,
4138
],
[
- 616,
+ 628,
157,
4139
],
[
- 615,
+ 627,
169,
4200
],
[
- 614,
+ 626,
176,
4201
],
[
- 614,
+ 626,
178,
4205
],
[
- 613,
+ 625,
184,
4260
],
[
- 613,
+ 625,
188,
4261
],
[
- 613,
+ 625,
190,
4420
],
[
- 613,
+ 625,
191,
4540
]
@@ -996,134 +1016,134 @@ var unipenData = {
".PEN": [
[
[
- 169,
- 59,
+ 224,
+ 27,
0
],
[
- 171,
- 59,
+ 223,
+ 27,
148
],
[
- 175,
- 59,
+ 222,
+ 34,
170
],
[
- 183,
- 59,
+ 222,
+ 39,
228
],
[
- 197,
- 59,
+ 223,
+ 46,
229
],
[
- 210,
- 59,
+ 223,
+ 47,
288
],
[
223,
- 61,
+ 50,
289
],
[
- 233,
- 61,
+ 224,
+ 53,
292
],
[
- 241,
- 61,
+ 224,
+ 56,
350
],
[
- 252,
- 62,
+ 224,
+ 57,
350
],
[
- 260,
- 62,
+ 225,
+ 59,
418
],
[
- 265,
- 62,
+ 225,
+ 61,
419
],
[
- 266,
+ 225,
62,
748
]
],
[
[
- 224,
- 27,
+ 169,
+ 59,
1367
],
[
- 223,
- 27,
+ 171,
+ 59,
1414
],
[
- 222,
- 34,
+ 175,
+ 59,
1444
],
[
- 222,
- 39,
+ 183,
+ 59,
1502
],
[
- 223,
- 46,
+ 197,
+ 59,
1503
],
[
- 223,
- 47,
+ 210,
+ 59,
1508
],
[
223,
- 50,
+ 61,
1566
],
[
- 224,
- 53,
+ 233,
+ 61,
1568
],
[
- 224,
- 56,
+ 241,
+ 61,
1629
],
[
- 224,
- 57,
+ 252,
+ 62,
1630
],
[
- 225,
- 59,
+ 260,
+ 62,
1630
],
[
- 225,
- 61,
+ 265,
+ 62,
1686
],
[
- 225,
+ 266,
62,
1687
]
@@ -1132,568 +1152,568 @@ var unipenData = {
[
244,
82,
- 3184
+ 2184
],
[
243,
81,
- 3259
+ 2259
],
[
242,
81,
- 3285
+ 2285
],
[
238,
80,
- 3349
+ 2349
],
[
225,
80,
- 3350
+ 2350
],
[
210,
80,
- 3412
+ 2412
],
[
198,
82,
- 3414
+ 2414
],
[
192,
84,
- 3474
+ 2474
],
[
186,
88,
- 3476
+ 2476
],
[
184,
90,
- 3478
+ 2478
],
[
180,
95,
- 3532
+ 2532
],
[
178,
100,
- 3533
+ 2533
],
[
178,
109,
- 3595
+ 2595
],
[
178,
117,
- 3598
+ 2598
],
[
181,
125,
- 3657
+ 2657
],
[
186,
130,
- 3658
+ 2658
],
[
194,
136,
- 3716
+ 2716
],
[
197,
137,
- 3717
+ 2717
],
[
199,
137,
- 3775
+ 2775
],
[
202,
137,
- 3776
+ 2776
],
[
204,
137,
- 3780
+ 2780
],
[
206,
137,
- 3835
+ 2835
],
[
223,
135,
- 3836
+ 2836
],
[
234,
133,
- 3897
+ 2897
],
[
240,
130,
- 3898
+ 2898
],
[
242,
129,
- 3900
+ 2900
],
[
244,
128,
- 3958
+ 2958
],
[
251,
120,
- 3959
+ 2959
],
[
253,
117,
- 4017
+ 3017
],
[
253,
114,
- 4020
+ 3020
],
[
253,
110,
- 4081
+ 3081
],
[
251,
104,
- 4083
+ 3083
],
[
249,
99,
- 4140
+ 3140
],
[
247,
95,
- 4141
+ 3141
],
[
243,
89,
- 4205
+ 3205
],
[
242,
86,
- 4206
+ 3206
],
[
242,
85,
- 4212
+ 3212
],
[
241,
84,
- 4284
+ 3284
],
[
240,
84,
- 4324
+ 3324
],
[
239,
84,
- 4596
- ]
- ],
- [
- [
- 177,
- 144,
- 6344
- ],
- [
- 178,
- 144,
- 6573
- ],
- [
- 178,
- 146,
- 6600
- ],
- [
- 179,
- 148,
- 6604
- ],
- [
- 179,
- 150,
- 6657
- ],
- [
- 180,
- 153,
- 6658
- ],
- [
- 181,
- 160,
- 6719
- ],
- [
- 182,
- 167,
- 6720
- ],
- [
- 183,
- 176,
- 6779
- ],
- [
- 184,
- 182,
- 6780
- ],
- [
- 184,
- 185,
- 6840
- ],
- [
- 185,
- 189,
- 6841
- ],
- [
- 186,
- 189,
- 7108
- ],
- [
- 195,
- 189,
- 7174
- ],
- [
- 206,
- 187,
- 7234
- ],
- [
- 213,
- 186,
- 7236
- ],
- [
- 219,
- 186,
- 7294
- ],
- [
- 224,
- 186,
- 7296
- ],
- [
- 233,
- 186,
- 7355
- ],
- [
- 241,
- 185,
- 7355
- ],
- [
- 252,
- 185,
- 7417
- ],
- [
- 262,
- 185,
- 7419
- ],
- [
- 268,
- 186,
- 7421
- ],
- [
- 276,
- 186,
- 7475
- ],
- [
- 281,
- 186,
- 7476
- ],
- [
- 289,
- 186,
- 7536
- ],
- [
- 290,
- 186,
- 7537
- ],
- [
- 291,
- 186,
- 7597
- ],
- [
- 292,
- 186,
- 7660
- ],
- [
- 293,
- 186,
- 7724
- ],
- [
- 294,
- 186,
- 7725
- ],
- [
- 295,
- 186,
- 8172
+ 3596
]
],
[
[
283,
25,
- 9136
+ 4344
],
[
283,
26,
- 9220
+ 4573
],
[
283,
27,
- 9244
+ 4600
],
[
283,
33,
- 9299
+ 4604
],
[
283,
41,
- 9300
+ 4657
],
[
282,
53,
- 9359
+ 4658
],
[
282,
65,
- 9359
+ 4719
],
[
282,
78,
- 9420
+ 4720
],
[
282,
92,
- 9421
+ 4779
],
[
281,
115,
- 9481
+ 4780
],
[
280,
124,
- 9482
+ 4840
],
[
279,
133,
- 9484
+ 4841
],
[
279,
135,
- 9542
+ 5108
],
[
278,
142,
- 9542
+ 5174
],
[
277,
148,
- 9605
+ 5234
],
[
277,
150,
- 9607
+ 5236
],
[
277,
151,
- 9764
+ 5294
],
[
277,
153,
- 9816
+ 5296
],
[
277,
154,
- 9876
+ 5355
],
[
277,
153,
- 10124
+ 5355
],
[
277,
151,
- 10180
+ 5417
]
],
[
[
282,
89,
- 10651
+ 6136
],
[
283,
89,
- 10796
+ 6220
],
[
286,
89,
- 10821
+ 6244
],
[
288,
88,
- 10879
+ 6299
],
[
291,
88,
- 10879
+ 6300
],
[
294,
88,
- 10941
+ 6359
],
[
295,
88,
- 10941
+ 6359
],
[
297,
88,
- 11003
+ 6420
],
[
298,
88,
- 11004
+ 6421
],
[
299,
88,
- 11061
+ 6481
],
[
300,
88,
- 11062
+ 6482
],
[
301,
88,
- 11121
+ 6484
],
[
302,
88,
- 11123
+ 6542
],
[
303,
88,
- 11185
+ 6542
],
[
304,
88,
- 11187
+ 6605
],
[
305,
88,
- 11189
+ 6607
],
[
306,
88,
- 11248
+ 6764
],
[
307,
88,
- 11249
+ 6816
],
[
309,
89,
- 11304
+ 6876
+ ]
+ ],
+ [
+ [
+ 177,
+ 144,
+ 7651
+ ],
+ [
+ 178,
+ 144,
+ 7796
+ ],
+ [
+ 178,
+ 146,
+ 7821
+ ],
+ [
+ 179,
+ 148,
+ 7879
+ ],
+ [
+ 179,
+ 150,
+ 7879
+ ],
+ [
+ 180,
+ 153,
+ 7941
+ ],
+ [
+ 181,
+ 160,
+ 7941
+ ],
+ [
+ 182,
+ 167,
+ 8003
+ ],
+ [
+ 183,
+ 176,
+ 8004
+ ],
+ [
+ 184,
+ 182,
+ 8061
+ ],
+ [
+ 184,
+ 185,
+ 8062
+ ],
+ [
+ 185,
+ 189,
+ 8121
+ ],
+ [
+ 186,
+ 189,
+ 8123
+ ],
+ [
+ 195,
+ 189,
+ 8185
+ ],
+ [
+ 206,
+ 187,
+ 8187
+ ],
+ [
+ 213,
+ 186,
+ 8189
+ ],
+ [
+ 219,
+ 186,
+ 8248
+ ],
+ [
+ 224,
+ 186,
+ 8249
+ ],
+ [
+ 233,
+ 186,
+ 8304
+ ],
+ [
+ 241,
+ 185,
+ 8304
+ ],
+ [
+ 252,
+ 185,
+ 8366
+ ],
+ [
+ 262,
+ 185,
+ 8368
+ ],
+ [
+ 268,
+ 186,
+ 8370
+ ],
+ [
+ 276,
+ 186,
+ 8424
+ ],
+ [
+ 281,
+ 186,
+ 8425
+ ],
+ [
+ 289,
+ 186,
+ 8485
+ ],
+ [
+ 290,
+ 186,
+ 8486
+ ],
+ [
+ 291,
+ 186,
+ 8546
+ ],
+ [
+ 292,
+ 186,
+ 8609
+ ],
+ [
+ 293,
+ 186,
+ 8673
+ ],
+ [
+ 294,
+ 186,
+ 8674
+ ],
+ [
+ 295,
+ 186,
+ 8738
]
]
],
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 9ecbc516..b72eba68 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -1174,6 +1174,9 @@ Rectangle {
function test_hwrInputSequence(data) {
prepareTest(data, true)
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var i = 0; i < data.toggleShiftCount; i++) {
inputPanel.toggleShift()
}
@@ -1192,6 +1195,52 @@ Rectangle {
compare(textInput.text, data.outputText)
}
+ function test_superimposedHwrInputSequence_data() {
+ return [
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "en_GB", inputSequence: "Hellohowareyou?", outputText: "Hello how are you?" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "fr_FR", inputSequence: "Bonjour", outputText: "Bonjour" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "da_DK", inputSequence: "Hej", outputText: "Hej" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "de_DE", inputSequence: "Hallo", outputText: "Hallo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "es_ES", inputSequence: "Hola", outputText: "Hola" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "et_EE", inputSequence: "Tere", outputText: "Tere" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "hr_HR", inputSequence: "Zdravo", outputText: "Zdravo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "it_IT", inputSequence: "Ciao", outputText: "Ciao" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "cs_CZ", inputSequence: "Ahoj", outputText: "Ahoj" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "bg_BG", inputSequence: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", outputText: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "\u4e2d\u6587", outputText: "\u4e2d\u6587" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_TW", inputSequence: "\u570b", outputText: "\u570b" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ja_JP", inputSequence: "\u65E5\u672C\u8A9E", outputText: "\u65E5\u672C\u8A9E" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ko_KR", inputSequence: "\uD55C\uAD6D\uC5B4", outputText: "\uD55C\uAD6D\uC5B4" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "el_GR", inputSequence: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", outputText: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "he_IL", inputSequence: "\u05D0\u05D5\u05D8\u05D5", outputText: "\u05D0\u05D5\u05D8\u05D5" },
+ ]
+ }
+
+ function test_superimposedHwrInputSequence(data) {
+ prepareTest(data, true)
+
+ if (!inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for non-Superimposed Handwriting")
+
+ for (var i = 0; i < data.toggleShiftCount; i++) {
+ inputPanel.toggleShift()
+ }
+ for (var inputIndex in data.inputSequence) {
+ verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
+ }
+ wait(2000)
+
+ if (inputPanel.wordCandidateView.count > 0) {
+ if (inputPanel.selectionListSearchSuggestion(data.outputText)) {
+ inputPanel.selectionListSelectCurrentItem()
+ }
+ }
+
+ Qt.inputMethod.commit()
+ waitForRendering(inputPanel)
+ compare(textInput.text, data.outputText)
+ }
+
function test_hwrNumericInputSequence_data() {
return [
{ initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhPreferNumbers, modeSwitchAllowed: true, inputSequence: "0123456789", outputText: "0123456789" },
@@ -1208,6 +1257,9 @@ Rectangle {
function test_hwrNumericInputSequence(data) {
prepareTest(data, true)
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var inputIndex in data.inputSequence) {
verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
}
@@ -1242,6 +1294,9 @@ Rectangle {
function test_hwrSpellCorrectionSuggestions(data) {
prepareTest(data, true)
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var inputIndex in data.inputSequence) {
verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
}
@@ -1278,12 +1333,61 @@ Rectangle {
handwritingInputPanel.available = true
verify(inputPanel.visible === false)
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
+ for (var i = 0; i < data.toggleShiftCount; i++) {
+ inputPanel.toggleShift()
+ }
+ for (var inputIndex in data.inputSequence) {
+ verify(handwritingInputPanel.emulateHandwriting(data.inputSequence[inputIndex], true))
+ }
+
+ if (handwritingInputPanel.wordCandidatePopupListSearchSuggestion(data.outputText)) {
+ handwritingInputPanel.wordCandidatePopupListSelectCurrentItem()
+ }
+
+ Qt.inputMethod.commit()
+ compare(textInput.text, data.outputText)
+ }
+
+ function test_superimposedHwrFullScreenInputSequence_data() {
+ return [
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "en_GB", inputSequence: "Hellohowareyou", outputText: "Hello how are you" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "fr_FR", inputSequence: "Bonjour", outputText: "Bonjour" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "da_DK", inputSequence: "Hej", outputText: "Hej" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "de_DE", inputSequence: "Hallo", outputText: "Hallo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "es_ES", inputSequence: "Hola", outputText: "Hola" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "et_EE", inputSequence: "Tere", outputText: "Tere" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "hr_HR", inputSequence: "Zdravo", outputText: "Zdravo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "it_IT", inputSequence: "Ciao", outputText: "Ciao" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "cs_CZ", inputSequence: "Ahoj", outputText: "Ahoj" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "bg_BG", inputSequence: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", outputText: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "\u4e2d\u6587", outputText: "\u4e2d\u6587" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_TW", inputSequence: "\u570b", outputText: "\u570b" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ja_JP", inputSequence: "\u65E5\u672C\u8A9E", outputText: "\u65E5\u672C\u8A9E" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ko_KR", inputSequence: "\uD55C\uAD6D\uC5B4", outputText: "\uD55C\uAD6D\uC5B4" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "el_GR", inputSequence: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", outputText: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "he_IL", inputSequence: "\u05D0\u05D5\u05D8\u05D5", outputText: "\u05D0\u05D5\u05D8\u05D5" },
+ ]
+ }
+
+ function test_superimposedHwrFullScreenInputSequence(data) {
+ prepareTest(data, true)
+
+ handwritingInputPanel.available = true
+ verify(inputPanel.visible === false)
+
+ if (!inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for non-Superimposed Handwriting")
+
for (var i = 0; i < data.toggleShiftCount; i++) {
inputPanel.toggleShift()
}
for (var inputIndex in data.inputSequence) {
verify(handwritingInputPanel.emulateHandwriting(data.inputSequence[inputIndex], true))
}
+ wait(2000)
if (handwritingInputPanel.wordCandidatePopupListSearchSuggestion(data.outputText)) {
handwritingInputPanel.wordCandidatePopupListSelectCurrentItem()
@@ -1308,6 +1412,9 @@ Rectangle {
handwritingInputPanel.available = true
verify(inputPanel.visible === false)
+ if (handwritingInputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var inputIndex in data.inputSequence) {
verify(handwritingInputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
}
@@ -1333,6 +1440,9 @@ Rectangle {
handwritingInputPanel.available = true
verify(inputPanel.visible === false)
+ if (handwritingInputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var inputIndex in data.inputSequence) {
verify(handwritingInputPanel.emulateHandwriting(data.inputSequence[inputIndex], true))
}
@@ -1357,6 +1467,9 @@ Rectangle {
if (!inputPanel.wordCandidateListVisibleHint)
skip("Word candidates not available (spell correction/hwr suggestions)")
+ if (handwritingInputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
var numAddedLines = Math.floor(textInput.height / Qt.inputMethod.cursorRectangle.height - data.initLinesToBottom) - 1
for (var i = 0; i < numAddedLines; i++) {
textInput.insert(textInput.length, "\n")
@@ -1498,6 +1611,9 @@ Rectangle {
function test_hwrWordReselection(data) {
prepareTest(data, true)
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
var cursorRects = []
for (var i = 0; i < data.clickPositions.length; i++)
cursorRects.push(textInput.positionToRectangle(data.clickPositions[i]))
diff --git a/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt b/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt
index cd2eab9b..16f1285e 100644
--- a/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt
+++ b/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt
@@ -8,114 +8,114 @@
.Y_POINTS_PER_INCH 94
.POINTS_PER_SECOND 60
.PEN_DOWN
-379 53 0
-380 53 155
-382 53 177
-385 53 179
-391 53 243
-400 53 244
-421 55 311
-437 55 313
-441 55 315
-448 55 365
-454 55 366
-461 55 370
-467 54 426
-472 54 427
-475 54 486
-477 54 487
-478 54 490
-479 54 548
-480 54 549
-482 54 610
-485 54 610
-488 54 670
-489 54 731
-489 55 939
-489 56 1003
-489 60 1004
-489 64 1064
-489 66 1065
-489 72 1124
-489 75 1125
-489 79 1131
-489 81 1184
-489 86 1185
-489 91 1245
-489 92 1246
-489 97 1306
-489 99 1307
-489 101 1366
-489 102 1367
-489 103 1427
-489 105 1429
-489 106 1500
-489 107 1549
-489 108 1550
-489 109 1614
+344 53 0
+345 53 155
+347 53 177
+350 53 179
+356 53 243
+365 53 244
+386 55 311
+402 55 313
+406 55 315
+413 55 365
+419 55 366
+426 55 370
+432 54 426
+437 54 427
+440 54 486
+442 54 487
+443 54 490
+444 54 548
+445 54 549
+447 54 610
+450 54 610
+453 54 670
+454 54 731
+454 55 939
+454 56 1003
+454 60 1004
+454 64 1064
+454 66 1065
+454 72 1124
+454 75 1125
+454 79 1131
+454 81 1184
+454 86 1185
+454 91 1245
+454 92 1246
+454 97 1306
+454 99 1307
+454 101 1366
+454 102 1367
+454 103 1427
+454 105 1429
+454 106 1500
+454 107 1549
+454 108 1550
+454 109 1614
.PEN_UP
.PEN_DOWN
-383 113 2999
-384 113 3259
-385 112 3291
-386 112 3360
-399 112 3361
-412 112 3389
-434 112 3449
-440 112 3450
-451 112 3451
-455 112 3510
-479 111 3511
-493 110 3574
-506 109 3576
-513 109 3632
-515 109 3633
-516 109 3636
+348 113 2999
+349 113 3259
+350 112 3291
+351 112 3360
+364 112 3361
+377 112 3389
+399 112 3449
+405 112 3450
+416 112 3451
+420 112 3510
+444 111 3511
+458 110 3574
+471 109 3576
+478 109 3632
+480 109 3633
+481 109 3636
.PEN_UP
.PEN_DOWN
-430 115 5767
-430 116 5851
-432 120 5884
-433 123 5937
-433 127 5938
-434 130 6000
-434 133 6002
-435 139 6058
-435 141 6059
-435 142 6124
-435 143 6523
+395 115 5767
+395 116 5851
+397 120 5884
+398 123 5937
+398 127 5938
+399 130 6000
+399 133 6002
+400 139 6058
+400 141 6059
+400 142 6124
+400 143 6523
.PEN_UP
.PEN_DOWN
-393 151 7943
-394 151 8099
-399 150 8124
-412 150 8184
-422 150 8185
-438 150 8245
-448 150 8246
-465 149 8305
-478 149 8306
-485 149 8366
-487 149 8366
-488 149 8432
-489 149 8490
-491 149 8492
-492 149 8549
-492 150 8835
-492 152 8882
-492 155 8883
-492 159 8944
-492 163 8945
-492 168 9005
-491 173 9005
-491 177 9067
-490 182 9068
-490 188 9126
-490 192 9126
-490 193 9130
-490 196 9188
-490 198 9247
-490 200 9247
-490 202 9307
-490 203 9308
+358 151 7943
+359 151 8099
+364 150 8124
+377 150 8184
+387 150 8185
+403 150 8245
+413 150 8246
+430 149 8305
+443 149 8306
+450 149 8366
+452 149 8366
+453 149 8432
+454 149 8490
+456 149 8492
+457 149 8549
+457 150 8835
+457 152 8882
+457 155 8883
+457 159 8944
+457 163 8945
+457 168 9005
+456 173 9005
+456 177 9067
+455 182 9068
+455 188 9126
+455 192 9126
+455 193 9130
+455 196 9188
+455 198 9247
+455 200 9247
+455 202 9307
+455 203 9308
.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt b/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt
index fd22d87d..03a24576 100644
--- a/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt
+++ b/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt
@@ -67,27 +67,31 @@
622 121 2840
623 121 2957
624 121 3045
-625 120 3236
+625 121 3096
+626 121 3155
+628 121 3199
+629 121 3254
+631 121 3310
.PEN_UP
.PEN_DOWN
-614 42 3848
-614 45 3896
-614 47 3897
-614 54 3900
-615 63 3958
-617 76 3958
-619 92 4017
-620 100 4018
-620 115 4078
-620 133 4079
-618 141 4084
-616 153 4138
-616 157 4139
-615 169 4200
-614 176 4201
-614 178 4205
-613 184 4260
-613 188 4261
-613 190 4420
-613 191 4540
+626 42 3848
+626 45 3896
+626 47 3897
+626 54 3900
+627 63 3958
+629 76 3958
+631 92 4017
+632 100 4018
+632 115 4078
+632 133 4079
+630 141 4084
+628 153 4138
+628 157 4139
+627 169 4200
+626 176 4201
+626 178 4205
+625 184 4260
+625 188 4261
+625 190 4420
+625 191 4540
.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt b/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt
index 99f6f912..25488a30 100644
--- a/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt
+++ b/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt
@@ -8,152 +8,152 @@
.Y_POINTS_PER_INCH 94
.POINTS_PER_SECOND 60
.PEN_DOWN
-169 59 0
-171 59 148
-175 59 170
-183 59 228
-197 59 229
-210 59 288
-223 61 289
-233 61 292
-241 61 350
-252 62 350
-260 62 418
-265 62 419
-266 62 748
+224 27 0
+223 27 148
+222 34 170
+222 39 228
+223 46 229
+223 47 288
+223 50 289
+224 53 292
+224 56 350
+224 57 350
+225 59 418
+225 61 419
+225 62 748
.PEN_UP
.PEN_DOWN
-224 27 1367
-223 27 1414
-222 34 1444
-222 39 1502
-223 46 1503
-223 47 1508
-223 50 1566
-224 53 1568
-224 56 1629
-224 57 1630
-225 59 1630
-225 61 1686
-225 62 1687
+169 59 1367
+171 59 1414
+175 59 1444
+183 59 1502
+197 59 1503
+210 59 1508
+223 61 1566
+233 61 1568
+241 61 1629
+252 62 1630
+260 62 1630
+265 62 1686
+266 62 1687
.PEN_UP
.PEN_DOWN
-244 82 3184
-243 81 3259
-242 81 3285
-238 80 3349
-225 80 3350
-210 80 3412
-198 82 3414
-192 84 3474
-186 88 3476
-184 90 3478
-180 95 3532
-178 100 3533
-178 109 3595
-178 117 3598
-181 125 3657
-186 130 3658
-194 136 3716
-197 137 3717
-199 137 3775
-202 137 3776
-204 137 3780
-206 137 3835
-223 135 3836
-234 133 3897
-240 130 3898
-242 129 3900
-244 128 3958
-251 120 3959
-253 117 4017
-253 114 4020
-253 110 4081
-251 104 4083
-249 99 4140
-247 95 4141
-243 89 4205
-242 86 4206
-242 85 4212
-241 84 4284
-240 84 4324
-239 84 4596
+244 82 2184
+243 81 2259
+242 81 2285
+238 80 2349
+225 80 2350
+210 80 2412
+198 82 2414
+192 84 2474
+186 88 2476
+184 90 2478
+180 95 2532
+178 100 2533
+178 109 2595
+178 117 2598
+181 125 2657
+186 130 2658
+194 136 2716
+197 137 2717
+199 137 2775
+202 137 2776
+204 137 2780
+206 137 2835
+223 135 2836
+234 133 2897
+240 130 2898
+242 129 2900
+244 128 2958
+251 120 2959
+253 117 3017
+253 114 3020
+253 110 3081
+251 104 3083
+249 99 3140
+247 95 3141
+243 89 3205
+242 86 3206
+242 85 3212
+241 84 3284
+240 84 3324
+239 84 3596
.PEN_UP
.PEN_DOWN
-177 144 6344
-178 144 6573
-178 146 6600
-179 148 6604
-179 150 6657
-180 153 6658
-181 160 6719
-182 167 6720
-183 176 6779
-184 182 6780
-184 185 6840
-185 189 6841
-186 189 7108
-195 189 7174
-206 187 7234
-213 186 7236
-219 186 7294
-224 186 7296
-233 186 7355
-241 185 7355
-252 185 7417
-262 185 7419
-268 186 7421
-276 186 7475
-281 186 7476
-289 186 7536
-290 186 7537
-291 186 7597
-292 186 7660
-293 186 7724
-294 186 7725
-295 186 8172
+283 25 4344
+283 26 4573
+283 27 4600
+283 33 4604
+283 41 4657
+282 53 4658
+282 65 4719
+282 78 4720
+282 92 4779
+281 115 4780
+280 124 4840
+279 133 4841
+279 135 5108
+278 142 5174
+277 148 5234
+277 150 5236
+277 151 5294
+277 153 5296
+277 154 5355
+277 153 5355
+277 151 5417
.PEN_UP
.PEN_DOWN
-283 25 9136
-283 26 9220
-283 27 9244
-283 33 9299
-283 41 9300
-282 53 9359
-282 65 9359
-282 78 9420
-282 92 9421
-281 115 9481
-280 124 9482
-279 133 9484
-279 135 9542
-278 142 9542
-277 148 9605
-277 150 9607
-277 151 9764
-277 153 9816
-277 154 9876
-277 153 10124
-277 151 10180
+282 89 6136
+283 89 6220
+286 89 6244
+288 88 6299
+291 88 6300
+294 88 6359
+295 88 6359
+297 88 6420
+298 88 6421
+299 88 6481
+300 88 6482
+301 88 6484
+302 88 6542
+303 88 6542
+304 88 6605
+305 88 6607
+306 88 6764
+307 88 6816
+309 89 6876
.PEN_UP
.PEN_DOWN
-282 89 10651
-283 89 10796
-286 89 10821
-288 88 10879
-291 88 10879
-294 88 10941
-295 88 10941
-297 88 11003
-298 88 11004
-299 88 11061
-300 88 11062
-301 88 11121
-302 88 11123
-303 88 11185
-304 88 11187
-305 88 11189
-306 88 11248
-307 88 11249
-309 89 11304
+177 144 7651
+178 144 7796
+178 146 7821
+179 148 7879
+179 150 7879
+180 153 7941
+181 160 7941
+182 167 8003
+183 176 8004
+184 182 8061
+184 185 8062
+185 189 8121
+186 189 8123
+195 189 8185
+206 187 8187
+213 186 8189
+219 186 8248
+224 186 8249
+233 186 8304
+241 185 8304
+252 185 8366
+262 185 8368
+268 186 8370
+276 186 8424
+281 186 8425
+289 186 8485
+290 186 8486
+291 186 8546
+292 186 8609
+293 186 8673
+294 186 8674
+295 186 8738
.PEN_UP