diff --git a/testing/web-platform/meta/css/selectors/invalidation/user-action-pseudo-classes-in-has.html.ini b/testing/web-platform/meta/css/selectors/invalidation/user-action-pseudo-classes-in-has.html.ini deleted file mode 100644 index 86ff56656a2f6..0000000000000 --- a/testing/web-platform/meta/css/selectors/invalidation/user-action-pseudo-classes-in-has.html.ini +++ /dev/null @@ -1,57 +0,0 @@ -[ -user -- -action -- -pseudo -- -classes -- -in -- -has -. -html -] -expected -: -if -os -= -= -" -mac -" -: -ERROR -[ -Invalidation -with -: -focus -: -focus -- -within -: -focus -- -visible -in -: -has -( -) -] -expected -: -if -os -= -= -" -mac -" -: -TIMEOUT -FAIL diff --git a/testing/web-platform/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html b/testing/web-platform/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html index fa43f04e77065..b7a73db19c4c7 100644 --- a/testing/web-platform/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html +++ b/testing/web-platform/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html @@ -545,28 +545,111 @@ ue004 ' ; -async_test +const +hovermeRect += +hoverme +. +getBoundingClientRect ( -function +) +; +const +focusme1Rect += +focusme1 +. +getBoundingClientRect +( +) +; +promise_test +( +async ( -t ) += +> { -hoverme +assert_equals +( +getComputedStyle +( +subject1 +) . -addEventListener +color +" +rgb ( +0 +0 +0 +) " -mouseover " -t +subject1 +initially +black +" +) +; +assert_equals +( +getComputedStyle +( +subject2 +) . -step_func +color +" +rgb ( -event -= -> +0 +0 +0 +) +" +" +subject3 +initially +black +" +) +; +await +new +test_driver +. +Actions +( +) +. +pointerMove +( +hovermeRect +. +x ++ +1 +hovermeRect +. +y ++ +1 { +origin +: +" +viewport +" +} +) +. +send +( +) +; assert_equals ( getComputedStyle @@ -615,25 +698,43 @@ " ) ; -} -) +await +new +test_driver +. +Actions +( ) -; -hoverme . -addEventListener +pointerMove ( +hovermeRect +. +x ++ +1 +hovermeRect +. +y ++ +1 +{ +origin +: " -mousedown +viewport " -t +} +) . -step_func +pointerDown ( -event -= -> -{ +) +. +send +( +) +; assert_equals ( getComputedStyle @@ -682,25 +783,22 @@ " ) ; -} -) +await +new +test_driver +. +Actions +( ) -; -hoverme . -addEventListener +pointerUp ( -" -mouseup -" -t +) . -step_func +send ( -event -= -> -{ +) +; assert_equals ( getComputedStyle @@ -751,25 +849,47 @@ " ) ; -} -) +await +new +test_driver +. +Actions +( ) -; -focusme1 . -addEventListener +pointerMove ( +focusme1Rect +. +x ++ +1 +focusme1Rect +. +y ++ +1 +{ +origin +: " -focus +viewport " -t +} +) . -step_func +pointerDown ( -function +) +. +pointerUp ( ) -{ +. +send +( +) +; assert_equals ( getComputedStyle @@ -818,6 +938,7 @@ " ) ; +await test_driver . send_keys @@ -828,25 +949,6 @@ tab_key ) ; -} -) -) -; -focusme2 -. -addEventListener -( -" -focus -" -t -. -step_func -( -function -( -) -{ assert_equals ( getComputedStyle @@ -895,6 +997,7 @@ " ) ; +await test_driver . send_keys @@ -905,25 +1008,6 @@ tab_key ) ; -} -) -) -; -focusme3 -. -addEventListener -( -" -focus -" -t -. -step_func -( -function -( -) -{ assert_equals ( getComputedStyle @@ -1026,6 +1110,7 @@ " ) ; +await test_driver . send_keys @@ -1036,25 +1121,6 @@ tab_key ) ; -} -) -) -; -focusme4 -. -addEventListener -( -" -focus -" -t -. -step_func_done -( -function -( -) -{ assert_equals ( getComputedStyle @@ -1159,168 +1225,6 @@ ; } ) -) -; -} -" -Invalidation -with -: -focus -: -focus -- -within -: -focus -- -visible -in -: -has -( -) -" -) -; -test -( -( -) -= -> -{ -assert_equals -( -getComputedStyle -( -subject1 -) -. -color -" -rgb -( -0 -0 -0 -) -" -) -; -assert_equals -( -getComputedStyle -( -subject2 -) -. -color -" -rgb -( -0 -0 -0 -) -" -) -; -} -" -ancestor -should -be -black -" -) -; -let -hovermeRect -= -hoverme -. -getBoundingClientRect -( -) -; -let -focusme1Rect -= -focusme1 -. -getBoundingClientRect -( -) -; -new -test_driver -. -Actions -( -) -. -pointerMove -( -hovermeRect -. -x -+ -1 -hovermeRect -. -y -+ -1 -{ -origin -: -" -viewport -" -} -) -. -pointerDown -( -) -. -pointerUp -( -) -. -pointerMove -( -focusme1Rect -. -x -+ -1 -focusme1Rect -. -y -+ -1 -{ -origin -: -" -viewport -" -} -) -. -pointerDown -( -) -. -pointerUp -( -) -. -send -( -) ; < /