From 30fc5db6f6c958d84562fb1e8784f626ad8ef77e Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 3 Mar 2025 18:06:17 +0100 Subject: [PATCH 1/5] test(web): add stress-test page for loading KMX keyboard from blob This currently occasionally fails when run with WebKit (e.g. Epiphany browser). --- web/src/test/manual/web/core/index.html | 61 ++++++++++++++++++ .../manual/web/core/test_8568_deadkeys.kmx | Bin 0 -> 1326 bytes web/src/test/manual/web/index.html | 1 + 3 files changed, 62 insertions(+) create mode 100644 web/src/test/manual/web/core/index.html create mode 100644 web/src/test/manual/web/core/test_8568_deadkeys.kmx diff --git a/web/src/test/manual/web/core/index.html b/web/src/test/manual/web/core/index.html new file mode 100644 index 0000000000..989cc88ff7 --- /dev/null +++ b/web/src/test/manual/web/core/index.html @@ -0,0 +1,61 @@ + + + + + + + + + + KeymanWeb Core Stress Test + + + + + +

KeymanWeb Sample Page - Core Testing

+

This page is designed to stress-test the loading a KMX keyboard from blob.

+

Be sure to reference the developer console for additional feedback.

+ +
+

Return to testing home page

+ + + \ No newline at end of file diff --git a/web/src/test/manual/web/core/test_8568_deadkeys.kmx b/web/src/test/manual/web/core/test_8568_deadkeys.kmx new file mode 100644 index 0000000000000000000000000000000000000000..88f00e8baf5cb34b76f0c49e74ea59f021eded31 GIT binary patch literal 1326 zcmZ{kJxtS46vYn(p`e3NR8T{jXc{$!(9)KgIG~`kLD4`p$|Mv}B2v=&5f&#$CkNx; zWE{{q7$#zjAT7Qf7ZRFN_PRzDa_$E=Oy?8-veI-m+=;OG$O6Rqwp?xJ06GUz#g1G z-6xFW+u=*#lfd7AD}jFm-v|B;{2KT#@Mqx7>{qz;=>T^Gegr%i_;D~3_z0K_{0cZ8 zcp01v{2q8W@JHYSyq*59z^C|t%9_@MZW5;y(;dyiufc{<7IlNMd9p#W+xVPHS^&#v zmX}pwM#*au>QlFR@FcOibz6tDM(m`sC@9qm%6>OB|w8%x}@wH8n## zsS9MYoW0~{6|4234|;V1wvi`%H?=%T-di_rdrYyTT1Cp0$vP#ClHOF4aizYd4<)my zChJOl%`sPsb)D_TZQj%-&Gu}k`QLl^z`Of`Z&)j&0k^kSy(RnF_StYhFSbc~jGMMM zXiMbFxZTuF)36otRXho|7jCvj{uZ|zvoGH49r-6b1-CEX>@)dyJPo&B0J9(D>$v^D zI$V){lkevj#7@^4v@Y_a_yW7H_?s&7s}t2Wzm*w3lf9Cn=Qd(zwHIkT;@nsxika~y fk2J-qbMiscellaneous tests for smaller features

Chirality testing/bootstrapping

+

KeymanWeb Core Stress Test

Tests option/variable store functionality

Platform testing

Prediction UI testing

From e16452b7843e862e21602d53e19522bceb517f81 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 4 Mar 2025 13:47:20 +0100 Subject: [PATCH 2/5] test(web): polish stress test for KM_Core Makes use of modules to make it easier to make additional tests, establishes an import map, renames to stress.html, and adds the stress test link to the manual testing home page. --- .../manual/web/core/keymanweb_import_map.json | 5 ++++ .../manual/web/core/load-keyboard-blob.js | 9 ++++++ web/src/test/manual/web/core/paths.js | 1 + .../web/core/{index.html => stress.html} | 28 +++++++++++-------- web/src/test/manual/web/index.html | 3 ++ 5 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 web/src/test/manual/web/core/keymanweb_import_map.json create mode 100644 web/src/test/manual/web/core/load-keyboard-blob.js create mode 100644 web/src/test/manual/web/core/paths.js rename web/src/test/manual/web/core/{index.html => stress.html} (70%) diff --git a/web/src/test/manual/web/core/keymanweb_import_map.json b/web/src/test/manual/web/core/keymanweb_import_map.json new file mode 100644 index 0000000000..b2013bb33f --- /dev/null +++ b/web/src/test/manual/web/core/keymanweb_import_map.json @@ -0,0 +1,5 @@ +{ + "imports": { + "keyman/": "../../../../../build/" + } +} diff --git a/web/src/test/manual/web/core/load-keyboard-blob.js b/web/src/test/manual/web/core/load-keyboard-blob.js new file mode 100644 index 0000000000..527f0e7203 --- /dev/null +++ b/web/src/test/manual/web/core/load-keyboard-blob.js @@ -0,0 +1,9 @@ +export async function loadKeyboardBlob(uri) { + const response = await fetch(uri); + if (!response.ok) { + throw new Error(`HTTP ${response.status} ${response.statusText}`); + } + + const buffer = await response.arrayBuffer(); + return new Uint8Array(buffer); +} diff --git a/web/src/test/manual/web/core/paths.js b/web/src/test/manual/web/core/paths.js new file mode 100644 index 0000000000..5b595711fa --- /dev/null +++ b/web/src/test/manual/web/core/paths.js @@ -0,0 +1 @@ +export const CORE_WASM = '../../../../../build/engine/core-processor/obj/import/core'; diff --git a/web/src/test/manual/web/core/index.html b/web/src/test/manual/web/core/stress.html similarity index 70% rename from web/src/test/manual/web/core/index.html rename to web/src/test/manual/web/core/stress.html index 989cc88ff7..14c1bded17 100644 --- a/web/src/test/manual/web/core/index.html +++ b/web/src/test/manual/web/core/stress.html @@ -9,18 +9,22 @@ KeymanWeb Core Stress Test - + +