diff --git a/testing/web-platform/tests/css/selectors/dir-pseudo-on-input-element.html b/testing/web-platform/tests/css/selectors/dir-pseudo-on-input-element.html index 8ef2b60b63959..fd877ac91b549 100644 --- a/testing/web-platform/tests/css/selectors/dir-pseudo-on-input-element.html +++ b/testing/web-platform/tests/css/selectors/dir-pseudo-on-input-element.html @@ -902,11 +902,14 @@ ; for ( -let +const type of [ ' +password +' +' text ' ' @@ -918,6 +921,15 @@ ' email ' +' +submit +' +' +reset +' +' +button +' ] ) { @@ -1515,7 +1527,7 @@ type = ' -password +radio ' ; assert_true @@ -1625,14 +1637,11 @@ ; for ( -let +const type of [ ' -password -' -' date ' ' @@ -1654,17 +1663,8 @@ radio ' ' -submit -' -' image ' -' -reset -' -' -button -' ] ) { diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-form-associated.window.js b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-form-associated.window.js new file mode 100644 index 0000000000000..776a7b2773056 --- /dev/null +++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-form-associated.window.js @@ -0,0 +1,479 @@ +/ +/ +Keep +this +mostly +synchronized +with +/ +/ +html +/ +semantics +/ +forms +/ +attributes +- +common +- +to +- +form +- +controls +/ +dirname +- +only +- +if +- +applies +. +html +/ +/ +except +that +won +' +t +have +" +reset +" +and +" +button +" +as +those +don +' +t +submit +their +value +[ +" +hidden +" +" +text +" +" +search +" +" +tel +" +" +url +" +" +email +" +" +password +" +" +submit +" +" +reset +" +" +button +" +] +. +forEach +( +type += +> +{ +test +( +t += +> +{ +const +input += +document +. +createElement +( +" +input +" +) +; +t +. +add_cleanup +( +( +) += +> +input +. +remove +( +) +) +; +input +. +type += +type +; +assert_equals +( +input +. +type +type +) +; +input +. +dir += +" +auto +" +; +input +. +value += +" +\ +u05D0 +" +; +/ +/ +The +Hebrew +letter +Alef +( +strongly +RTL +) +document +. +body +. +append +( +input +) +; +assert_true +( +input +. +matches +( +" +: +dir +( +rtl +) +" +) +) +; +} +< +input +dir += +auto +type += +{ +type +} +> +directionality +) +; +} +) +; +[ +" +date +" +" +month +" +" +week +" +" +time +" +" +datetime +- +local +" +" +number +" +" +range +" +" +color +" +" +checkbox +" +" +radio +" +/ +/ +" +file +" +/ +/ +value +setter +throws +" +image +" +] +. +forEach +( +type += +> +{ +test +( +t += +> +{ +const +input += +document +. +createElement +( +" +input +" +) +; +t +. +add_cleanup +( +( +) += +> +input +. +remove +( +) +) +; +input +. +type += +type +; +assert_equals +( +input +. +type +type +) +; +input +. +dir += +" +auto +" +; +input +. +value += +" +\ +u05D0 +" +; +/ +/ +The +Hebrew +letter +Alef +( +strongly +RTL +) +document +. +body +. +append +( +input +) +; +assert_true +( +input +. +matches +( +" +: +dir +( +ltr +) +" +) +) +; +} +< +input +dir += +auto +type += +{ +type +} +> +directionality +) +; +} +) +; +test +( +t += +> +{ +const +input += +document +. +createElement +( +" +textarea +" +) +; +t +. +add_cleanup +( +( +) += +> +input +. +remove +( +) +) +; +input +. +dir += +" +auto +" +; +input +. +value += +" +\ +u05D0 +" +; +/ +/ +The +Hebrew +letter +Alef +( +strongly +RTL +) +document +. +body +. +append +( +input +) +; +assert_true +( +input +. +matches +( +" +: +dir +( +rtl +) +" +) +) +; +} +< +textarea +dir += +auto +> +directionality +) +; diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01-ref.html b/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01-ref.html index 3d4220d6df84f..599871924f90c 100644 --- a/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01-ref.html +++ b/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01-ref.html @@ -74,7 +74,7 @@ > < link -tel +rel = " help diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01.html b/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01.html index 836f02ec782c7..fabe004efce60 100644 --- a/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01.html +++ b/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xmllang-01.html @@ -95,7 +95,7 @@ > < link -tel +rel = " help diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xyzzy.html b/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xyzzy.html index c942e7c762f1f..00a6140a2f23b 100644 --- a/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xyzzy.html +++ b/testing/web-platform/tests/html/dom/elements/global-attributes/lang-xyzzy.html @@ -94,7 +94,7 @@ > < link -tel +rel = " help diff --git a/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-only-if-applies.html b/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-only-if-applies.html index 6c1e634e6a73e..4e584d3fbc37b 100644 --- a/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-only-if-applies.html +++ b/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-only-if-applies.html @@ -206,7 +206,7 @@ p > < -button +input id = " @@ -217,11 +217,17 @@ type = submit -> +name += +submit +dirname += +submit +. +dir +value += Submit -< -/ -button > < / @@ -251,13 +257,13 @@ = [ " -text +hidden " " -search +text " " -hidden +search " " tel @@ -268,6 +274,12 @@ " email " +" +password +" +" +submit +" ] ; const @@ -275,9 +287,6 @@ = [ " -password -" -" date " " @@ -290,15 +299,6 @@ time " " -image -" -" -reset -" -" -button -" -" datetime - local @@ -322,7 +322,13 @@ file " " -submit +image +" +" +reset +" +" +button " ] ; @@ -360,6 +366,20 @@ types ) { +if +( +type += += += +" +submit +" +) +{ +continue +; +} let p = @@ -623,12 +643,27 @@ } } const +submitter += +document +. +getElementById +( +" +btn +- +submit +" +) +; +const data = new FormData ( form +submitter ) ; test @@ -698,16 +733,7 @@ " ) ; -document -. -getElementById -( -" -btn -- -submit -" -) +submitter . click (