-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1841588 [wpt PR 40868] - [CapturedMouseEvents] Export web platfor…
…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
Showing
13 changed files
with
2,422 additions
and
11 deletions.
There are no files selected for viewing
241 changes: 241 additions & 0 deletions
241
...-platform/tests/captured-mouse-events/capture-controller-oncapturedmousechange.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
> |
Oops, something went wrong.