Skip to content

Commit 1988ede

Browse files
committed
Bug 1966338 [wpt PR 52527] - add tests for canonicalisation of the video preload attribute,
Automatic update from web-platform-tests add tests for canonicalisation of the video preload attribute (#52527) -- wpt-commits: 3b98b229846386fa60eec6ecb6ef93074033c4c5 wpt-pr: 52527 Differential Revision: https://phabricator.services.mozilla.com/D250623 UltraBlame original commit: 7db870643f1aa46af646cf0424d98cd4b6b23407
1 parent 7407f1c commit 1988ede

File tree

4 files changed

+265
-2
lines changed

4 files changed

+265
-2
lines changed

testing/web-platform/tests/html/dom/elements-embedded.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,17 @@ auto
662662
}
663663
defaultVal
664664
:
665-
null
665+
[
666+
"
667+
none
668+
"
669+
"
670+
metadata
671+
"
672+
"
673+
auto
674+
"
675+
]
666676
}
667677
autoplay
668678
:
@@ -813,7 +823,17 @@ auto
813823
}
814824
defaultVal
815825
:
816-
null
826+
[
827+
"
828+
none
829+
"
830+
"
831+
metadata
832+
"
833+
"
834+
auto
835+
"
836+
]
817837
}
818838
autoplay
819839
:

testing/web-platform/tests/html/dom/new-harness.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ assert_equals
3939
;
4040
ReflectionHarness
4141
.
42+
assertInArray
43+
=
44+
assert_in_array
45+
;
46+
ReflectionHarness
47+
.
4248
assertThrows
4349
=
4450
assert_throws_dom

testing/web-platform/tests/html/dom/original-harness.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,102 @@ expected
817817
}
818818
ReflectionHarness
819819
.
820+
assertInArray
821+
=
822+
function
823+
(
824+
expected
825+
actual
826+
description
827+
)
828+
{
829+
if
830+
(
831+
actual
832+
.
833+
includes
834+
(
835+
expected
836+
)
837+
)
838+
{
839+
this
840+
.
841+
increment
842+
(
843+
this
844+
.
845+
passed
846+
)
847+
;
848+
}
849+
else
850+
{
851+
this
852+
.
853+
increment
854+
(
855+
this
856+
.
857+
failed
858+
)
859+
;
860+
this
861+
.
862+
reportFailure
863+
(
864+
this
865+
.
866+
currentTestDescription
867+
+
868+
(
869+
description
870+
?
871+
"
872+
followed
873+
by
874+
"
875+
+
876+
description
877+
:
878+
"
879+
"
880+
)
881+
+
882+
'
883+
(
884+
expected
885+
one
886+
of
887+
'
888+
+
889+
this
890+
.
891+
stringRep
892+
(
893+
actual
894+
)
895+
+
896+
'
897+
got
898+
'
899+
+
900+
this
901+
.
902+
stringRep
903+
(
904+
expected
905+
)
906+
+
907+
'
908+
)
909+
'
910+
)
911+
;
912+
}
913+
}
914+
ReflectionHarness
915+
.
820916
assertThrows
821917
=
822918
function

testing/web-platform/tests/html/dom/reflection.js

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5078,6 +5078,30 @@ function
50785078
(
50795079
)
50805080
{
5081+
if
5082+
(
5083+
Array
5084+
.
5085+
isArray
5086+
(
5087+
defaultVal
5088+
)
5089+
)
5090+
{
5091+
ReflectionHarness
5092+
.
5093+
assertInArray
5094+
(
5095+
idlObj
5096+
[
5097+
idlName
5098+
]
5099+
defaultVal
5100+
)
5101+
;
5102+
}
5103+
else
5104+
{
50815105
ReflectionHarness
50825106
.
50835107
assertEquals
@@ -5090,6 +5114,7 @@ defaultVal
50905114
)
50915115
;
50925116
}
5117+
}
50935118
"
50945119
IDL
50955120
get
@@ -6687,6 +6712,40 @@ getAttribute
66876712
"
66886713
)
66896714
;
6715+
if
6716+
(
6717+
Array
6718+
.
6719+
isArray
6720+
(
6721+
domExpected
6722+
[
6723+
i
6724+
]
6725+
)
6726+
)
6727+
{
6728+
ReflectionHarness
6729+
.
6730+
assertInArray
6731+
(
6732+
idlObj
6733+
[
6734+
idlName
6735+
]
6736+
domExpected
6737+
[
6738+
i
6739+
]
6740+
"
6741+
IDL
6742+
get
6743+
"
6744+
)
6745+
;
6746+
}
6747+
else
6748+
{
66906749
ReflectionHarness
66916750
.
66926751
assertEquals
@@ -6706,6 +6765,7 @@ get
67066765
)
67076766
;
67086767
}
6768+
}
67096769
"
67106770
setAttribute
67116771
(
@@ -7058,6 +7118,87 @@ getAttribute
70587118
}
70597119
if
70607120
(
7121+
data
7122+
.
7123+
type
7124+
=
7125+
=
7126+
"
7127+
enum
7128+
"
7129+
&
7130+
&
7131+
data
7132+
.
7133+
nonCanon
7134+
[
7135+
idlObj
7136+
[
7137+
idlName
7138+
]
7139+
]
7140+
)
7141+
{
7142+
ReflectionHarness
7143+
.
7144+
assertEquals
7145+
(
7146+
idlObj
7147+
[
7148+
idlName
7149+
]
7150+
data
7151+
.
7152+
nonCanon
7153+
[
7154+
idlObj
7155+
[
7156+
idlName
7157+
]
7158+
]
7159+
"
7160+
IDL
7161+
get
7162+
canonical
7163+
"
7164+
)
7165+
;
7166+
}
7167+
if
7168+
(
7169+
Array
7170+
.
7171+
isArray
7172+
(
7173+
idlIdlExpected
7174+
[
7175+
i
7176+
]
7177+
)
7178+
)
7179+
{
7180+
ReflectionHarness
7181+
.
7182+
assertInArray
7183+
(
7184+
idlObj
7185+
[
7186+
idlName
7187+
]
7188+
idlIdlExpected
7189+
[
7190+
i
7191+
]
7192+
"
7193+
IDL
7194+
get
7195+
"
7196+
)
7197+
;
7198+
}
7199+
else
7200+
if
7201+
(
70617202
idlIdlExpected
70627203
[
70637204
i

0 commit comments

Comments
 (0)