diff --git a/testing/web-platform/tests/pointerevents/pointerevent_iframe-touch-action-none_touch.html b/testing/web-platform/tests/pointerevents/pointerevent_iframe-touch-action-none_touch.html index 1c9651d8c162..109aec8dcd38 100644 --- a/testing/web-platform/tests/pointerevents/pointerevent_iframe-touch-action-none_touch.html +++ b/testing/web-platform/tests/pointerevents/pointerevent_iframe-touch-action-none_touch.html @@ -42,10 +42,13 @@ actions_promise.then(() => test_pointerEvent.done()); }); - on_event(window, "message", e => { - var msg = JSON.parse(event.data); - if (msg.type == "event") - event_log.push(msg.eventType); + on_event(window, "message", function(event) { + if (event.source != target.contentWindow) { + return; + } + if (event.data && event.data.type == "subframe-event") { + event_log.push(event.data.eventType); + } }); actions_promise = new test_driver.Actions() diff --git a/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html b/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html index bcfb5e06588e..0a894d4401e8 100644 --- a/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html +++ b/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html @@ -11,10 +11,10 @@