From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../web-platform/tests/editing/data/superscript.js | 443 +++++++++++++++++++++ 1 file changed, 443 insertions(+) create mode 100644 testing/web-platform/tests/editing/data/superscript.js (limited to 'testing/web-platform/tests/editing/data/superscript.js') diff --git a/testing/web-platform/tests/editing/data/superscript.js b/testing/web-platform/tests/editing/data/superscript.js new file mode 100644 index 0000000000..310f471a97 --- /dev/null +++ b/testing/web-platform/tests/editing/data/superscript.js @@ -0,0 +1,443 @@ +// For documentation of the format, see README in this directory. +var browserTests = [ +["foo[]bar", + [["superscript",""]], + "foo[]bar", + [true], + {"superscript":[false,false,"",false,true,""]}], +// should be used instead of because +// changes font-size too, thus, they are not equivalent. Additionally, +// even if specifying `font-size`, it'd be removed by the other commands. +// Therefore, it's hard to maintain only with CSS. +// See also . +["

[foo

bar]

", + [["stylewithcss","true"],["superscript",""]], + "

[foo

bar]

", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["

[foo

bar]

", + [["stylewithcss","false"],["superscript",""]], + "

[foo

bar]

", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["[foo bar]", + [["stylewithcss","true"],["superscript",""]], + "[foo bar]", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["[foo bar]", + [["stylewithcss","false"],["superscript",""]], + "[foo bar]", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["

[foo

bar

baz]

", + [["stylewithcss","true"],["superscript",""]], + "

[foo

bar

baz]

", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["

[foo

bar

baz]

", + [["stylewithcss","false"],["superscript",""]], + "

[foo

bar

baz]

", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["

[foo


bar]", + [["stylewithcss","true"],["superscript",""]], + "

[foo


bar]

", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["

[foo


bar]", + [["stylewithcss","false"],["superscript",""]], + "

[foo


bar]

", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[]bar", + [["superscript",""]], + "foo[]bar", + [true], + {"superscript":[false,false,"",false,true,""]}], +["foo[]bar", + [["superscript",""]], + "foo[]bar", + [true], + {"superscript":[false,false,"",false,true,""]}], +["foo{}bar", + [["superscript",""]], + "foo{}bar", + [true], + {"superscript":[false,false,"",false,true,""]}], +["foo[]bar", + [["superscript",""]], + "foo[]bar", + [true], + {"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[barbaz]qozquz", + [["stylewithcss","true"],["superscript",""]], + "foo[barbaz]qozquz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[barbaz]qozquz", + [["stylewithcss","false"],["superscript",""]], + "foo[barbaz]qozquz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[barbaz]qozquz", + [["stylewithcss","true"],["superscript",""]], + "foo[barbaz]qozquz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[barbaz]qozquz", + [["stylewithcss","false"],["superscript",""]], + "foo[barbaz]qozquz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["{

foo

}", + [["stylewithcss","true"],["superscript",""]], + "{

foo

}", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["{

foo

}", + [["stylewithcss","false"],["superscript",""]], + "{

foo

}", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["
foob[a]rbaz
", + [["stylewithcss","true"],["superscript",""]], + "
foob[a]rbaz
", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["
foob[a]rbaz
", + [["stylewithcss","false"],["superscript",""]], + "
foob[a]rbaz
", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","true"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","false"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","true"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","false"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","true"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","false"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","true"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["
foobarbaz
", + [["stylewithcss","false"],["superscript",""]], + "{}
foobarbaz
", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["{
foobarbaz
}", + [["stylewithcss","true"],["superscript",""]], + "{
foobarbaz
}", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["{
foobarbaz
}", + [["stylewithcss","false"],["superscript",""]], + "{
foobarbaz
}", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +// Although is not equivalent to `vertical-align: super` as mentioned +// above, they are obviously conflict. Therefore, `vertical-align` style of +// ancestor and descendants elements of selection should be removed to make +// work. +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +["foob[a]rbaz", + [["superscript",""]], + "foob[a]rbaz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foob[a]rbaz", + [["superscript",""]], + "foob[a]rbaz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","true"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foob[a]rbaz", + [["stylewithcss","false"],["superscript",""]], + "foob[a]rbaz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["fo[ob]arbaz", + [["superscript",""]], + "fo[ob]arbaz", + [true], + {"superscript":[true,false,"",false,true,""]}], +["fooba[rb]az", + [["superscript",""]], + "fooba[rb]az", + [true], + {"superscript":[true,false,"",false,true,""]}], +["fo[obarb]az", + [["superscript",""]], + "fo[obarb]az", + [true], + {"superscript":[true,false,"",false,true,""]}], +["foo[b]arbaz", + [["superscript",""]], + "foo[b]arbaz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["fooba[r]baz", + [["superscript",""]], + "fooba[r]baz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +["foo{bar}baz", + [["stylewithcss","true"],["superscript",""]], + "foo{bar}baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo{bar}baz", + [["stylewithcss","false"],["superscript",""]], + "foo{bar}baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +// The selected text not in should be moved into the existing . +["fo[ob]ar", + [["superscript",""]], + "fo[ob]ar", + [true], + {"superscript":[true,false,"",false,true,""]}], +// In the following cases, the vertical-align style in the range should be +// removed first, then, apply . +["fo[ob]ar", + [["stylewithcss","true"],["superscript",""]], + "fo[ob]ar", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["fo[ob]ar", + [["stylewithcss","false"],["superscript",""]], + "fo[ob]ar", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["fo[ob]ar", + [["stylewithcss","true"],["superscript",""]], + "fo[ob]ar", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["fo[ob]ar", + [["stylewithcss","false"],["superscript",""]], + "fo[ob]ar", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +// Even if a vertical-align value is not related to /, it should be +// removed to make new work cleanly. +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +// Remove when it becomes only having an invisible
element. +["foo[bar]
", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]
", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo[bar]
", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]
", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}] +] -- cgit v1.2.3