summaryrefslogtreecommitdiffstats
path: root/tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html')
-rw-r--r--tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html b/tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html
index 8d73160ed8..c8f9e977fe 100644
--- a/tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html
+++ b/tests/manual/wasm/qwasmwindow/qwasmwindow_harness.html
@@ -9,6 +9,7 @@
const testSandbox = document.createElement('div');
testSandbox.id = 'test-sandbox';
+ let nextScreenId = 1;
document.body.appendChild(testSandbox);
const eventList = [];
@@ -21,6 +22,7 @@
screenDiv.style.width = `${width}px`;
screenDiv.style.height = `${height}px`;
screenDiv.style.backgroundColor = 'lightblue';
+ screenDiv.id = `test-screen-${nextScreenId++}`;
return screenDiv;
};
@@ -62,7 +64,11 @@
reportEvent: event => {
eventList.push(event);
},
- events: () => eventList
+ events: () => eventList,
+ hitTestPoint: (x, y, screenId) => {
+ return document
+ .querySelector(`#${screenId}`).shadowRoot.elementsFromPoint(x, y);
+ }
};
})();
</script>