// For documentation of the format, see README in this directory. var browserTests = [ ["foo[]bar", [["subscript",""]], "foo[]bar", [true], {"subscript":[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"],["subscript",""]], "

[foo

bar]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["

[foo

bar]

", [["stylewithcss","false"],["subscript",""]], "

[foo

bar]

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

[foo

bar

baz]

", [["stylewithcss","true"],["subscript",""]], "

[foo

bar

baz]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["

[foo

bar

baz]

", [["stylewithcss","false"],["subscript",""]], "

[foo

bar

baz]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["

[foo


bar]", [["stylewithcss","true"],["subscript",""]], "

[foo


bar]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["

[foo


bar]", [["stylewithcss","false"],["subscript",""]], "

[foo


bar]

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

foo

}", [["stylewithcss","true"],["subscript",""]], "{

foo

}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["{

foo

}", [["stylewithcss","false"],["subscript",""]], "{

foo

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["
foob[a]rbaz
", [["stylewithcss","true"],["subscript",""]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["
foob[a]rbaz
", [["stylewithcss","false"],["subscript",""]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["subscript",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["{
foobarbaz
}", [["stylewithcss","true"],["subscript",""]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["{
foobarbaz
}", [["stylewithcss","false"],["subscript",""]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], // Although is not equivalent to `vertical-align: sub` 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"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["subscript",""]], "foob[a]rbaz", [true], {"subscript":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["subscript",""]], "foob[a]rbaz", [true], {"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["subscript",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["fo[ob]arbaz", [["subscript",""]], "fo[ob]arbaz", [true], {"subscript":[true,false,"",false,true,""]}], ["fooba[rb]az", [["subscript",""]], "fooba[rb]az", [true], {"subscript":[true,false,"",false,true,""]}], ["fo[obarb]az", [["subscript",""]], "fo[obarb]az", [true], {"subscript":[true,false,"",false,true,""]}], ["foo[b]arbaz", [["subscript",""]], "foo[b]arbaz", [true], {"subscript":[false,true,"",false,false,""]}], ["fooba[r]baz", [["subscript",""]], "fooba[r]baz", [true], {"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","true"],["subscript",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","false"],["subscript",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}], // The selected text not in should be moved into the existing . ["fo[ob]ar", [["subscript",""]], "fo[ob]ar", [true], {"subscript":[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"],["subscript",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["subscript",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","true"],["subscript",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["subscript",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[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"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["subscript",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}], ]