Skip to content

Commit

Permalink
Bug 1841588 [wpt PR 40868] - [CapturedMouseEvents] Export web platfor…
Browse files Browse the repository at this point in the history
…m tests, a=testonly

Automatic update from web-platform-tests
[CapturedMouseEvents] Export web platform tests (#40868)

This patch exports existing WPT tests added in [1], using the directory
recently introduced in [2] and taking into account the recent renaming
to "captured mouse events".

It also adds a manual test that is verified to pass with [3] applied.
WPT does not provide support for more complex and automated tests,
so this is just a minimal verification. More advanced internal tests
with wider coverage will be added in [3].

[1] https://chromium-review.googlesource.com/c/chromium/src/+/4517372
[2] web-platform-tests/wpt#40826
[3] https://chromium-review.googlesource.com/c/chromium/src/+/4549484

Bug: 1444712
Change-Id: I8ed455c406d6cba81cb4df0651509b6d6f7bd991
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4661012
Commit-Queue: Frédéric Wang <fwangigalia.com>
Reviewed-by: Elad Alon <eladalonchromium.org>
Cr-Commit-Position: refs/heads/main{#1167752}

Co-authored-by: Frédéric Wang <fwangigalia.com>
--

wpt-commits: 72a4f49ebcd4f5d7980bd3a2cdc90805427a93bd
wpt-pr: 40868

UltraBlame original commit: 0f575dff16b1f1842680b1916ccf26ebfc2a0539
  • Loading branch information
marco-c committed Jul 21, 2023
1 parent ecc4718 commit f03af94
Show file tree
Hide file tree
Showing 13 changed files with 2,378 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
<
!
doctype
html
>
<
meta
charset
=
utf
-
8
>
<
link
rel
=
'
help
'
href
=
'
https
:
/
/
screen
-
share
.
github
.
io
/
captured
-
mouse
-
events
/
#
capture
-
controller
-
extensions
'
>
<
script
src
=
"
/
resources
/
testharness
.
js
"
>
<
/
script
>
<
script
src
=
"
/
resources
/
testharnessreport
.
js
"
>
<
/
script
>
<
script
>
test
(
(
)
=
>
{
const
controller
=
new
CaptureController
(
)
;
assert_equals
(
controller
.
oncapturedmousechange
null
)
;
}
"
oncapturedmousechange
is
initially
unset
"
)
;
test
(
(
)
=
>
{
const
controller
=
new
CaptureController
(
)
;
let
result
=
undefined
;
controller
.
oncapturedmousechange
=
(
e
)
=
>
{
result
=
{
target
:
e
.
currentTarget
surfaceX
:
e
.
surfaceX
surfaceY
:
e
.
surfaceY
}
;
}
;
const
init
=
{
surfaceX
:
5
surfaceY
:
7
}
;
controller
.
dispatchEvent
(
new
CapturedMouseEvent
(
"
capturedmousechange
"
init
)
)
;
assert_equals
(
result
.
target
controller
)
;
assert_equals
(
result
.
surfaceX
init
.
surfaceX
)
;
assert_equals
(
result
.
surfaceY
init
.
surfaceY
)
;
}
"
dispatching
a
CapturedMouseEvent
on
CaptureController
should
trigger
oncapturedmousechange
"
)
;
<
/
script
>
Loading

0 comments on commit f03af94

Please sign in to comment.