Bug 1693596 [wpt PR 27680] - Fix pointerevents/pointerevent_iframe-touch-action-none_touch.html, a=testonly

Automatic update from web-platform-tests
Fix pointerevents/pointerevent_iframe-touch-action-none_touch.html

We got a script error when running the test
pointerevents/pointerevent_iframe-touch-action-none_touch.html on wpt
dashboard. I found out the problem is "JSON.parse", so I remove it.
https://wpt.fyi/results/pointerevents/
pointerevent_iframe-touch-action-none_touch.html?label=master&
label=experimental&aligned

The reason of the script error is there are some messages from
testdriver-complete which are not a string, they are just objects, so
JSON.parse cannot parse them.

Bug: 1163370
Change-Id: I368a0f0622606cce89b46ee4dc0a0431aef28096
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2702613
Commit-Queue: Lan Wei <lanwei@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857360}

--

wpt-commits: 95924af989a2f3a00cfe3ca173aa83e727fecf63
wpt-pr: 27680
This commit is contained in:
Lan Wei 2021-03-10 21:00:25 +00:00 коммит произвёл moz-wptsync-bot
Родитель aad92f7726
Коммит c2c3a85b51
2 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -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()

Просмотреть файл

@ -11,10 +11,10 @@
<body></body>
<script>
function handler(e) {
window.top.postMessage(JSON.stringify({
"type": "event",
window.top.postMessage({
"type": "subframe-event",
"eventType": e.type
}), "*");
}, "*");
}
["pointerup", "pointercancel"].forEach(eventType => {