// For documentation of the format, see README in this directory. var browserTests = [ ["foo[]bar", [["strikethrough",""]], "foo[]bar", [true], {"strikethrough":[false,false,"",false,true,""]}], ["

[foo

bar]

", [["stylewithcss","true"],["strikethrough",""]], "

[foo

bar]

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

[foo

bar]

", [["stylewithcss","false"],["strikethrough",""]], "

[foo

bar]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], // The first should be styled with text-decoration, then, it becomes a // good container for the following text node and the other . ["[foo bar]", [["stylewithcss","true"],["strikethrough",""]], "foo bar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["[foo bar]", [["stylewithcss","false"],["strikethrough",""]], "[foo bar]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], // Entire the content of the first

and the last

should be wrapped in // new elements, and in the middle

, the element should be // styled but the invisible text nodes should be ignored. ["

[foo

bar

baz]

", [["stylewithcss","true"],["strikethrough",""]], "

[foo

bar

baz

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

[foo

bar

baz]

", [["stylewithcss","false"],["strikethrough",""]], "

[foo

bar

baz]

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

[foo


bar]", [["stylewithcss","true"],["strikethrough",""]], "

[foo


bar]

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

[foo


bar]", [["stylewithcss","false"],["strikethrough",""]], "

[foo


bar]

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

foo

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

foo

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

foo

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

foo

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["
foob[a]rbaz
", [["stylewithcss","true"],["strikethrough",""]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["
foob[a]rbaz
", [["stylewithcss","false"],["strikethrough",""]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["strikethrough",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["{
foobarbaz
}", [["stylewithcss","true"],["strikethrough",""]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["{
foobarbaz
}", [["stylewithcss","false"],["strikethrough",""]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], // is just representing underline style. Therefore, browsers should not // keep it. Instead, it should be replaced with new and set its // text-decoration to line-through (requested style) and underline (default // style of ). ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], // The which is a container of the range has text-decoration style. // Therefore, it should be updated rather than creating new element. ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["

foo[bar]baz

", [["stylewithcss","true"],["strikethrough",""]], "

foo[bar]baz

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

foo[bar]baz

", [["stylewithcss","false"],["strikethrough",""]], "

foo[bar]baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], // Should not replace existing with / when removing the style // partially. ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], // Should set text-decoration of because it has underline style by // default and it is not only representing it, thus, replacing it with // changes the meaning. ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], // should be replaced with or element. ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], // Should replace with new and set its `text-decoration` to // line-though (for applying the requested style) and overline (which was // specified to the ). Note that underline was removed by the // text-decoration setting. Therefore, it should not appear. ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["

foo[bar]baz

", [["stylewithcss","true"],["strikethrough",""]], "

foo[bar]baz

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

foo[bar]baz

", [["stylewithcss","false"],["strikethrough",""]], "

foo[bar]baz

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

foo[bar]baz

", [["stylewithcss","true"],["strikethrough",""]], "

foo[bar]baz

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

foo[bar]baz

", [["stylewithcss","false"],["strikethrough",""]], "

foo[bar]baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","true"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], ["foob[a]rbaz", [["stylewithcss","false"],["strikethrough",""]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foob[a]rbaz", [["strikethrough",""]], "foob[a]rbaz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foo[bar]baz", [["strikethrough",""]], "foo[bar]baz", [true], {"strikethrough":[false,true,"",false,true,""]}], ["foob[a]rbaz", [["strikethrough",""]], "foob[a]rbaz", [true], {"strikethrough":[false,true,"",false,true,""]}], // Should wrap in new only when it's not wrapped in ["fo[ob]arbaz", [["strikethrough",""]], "foobarbaz", [true], {"strikethrough":[true,false,"",false,true,""]}], ["fooba[rb]az", [["strikethrough",""]], "foobarbaz", [true], {"strikethrough":[true,false,"",false,true,""]}], ["fo[obarb]az", [["stylewithcss","true"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[true,false,"",false,true,""]}], ["fo[obarb]az", [["stylewithcss","false"],["strikethrough",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[true,false,"",false,true,""]}], ["foo[b]arbaz", [["stylewithcss","true"],["strikethrough",""]], "foo[b]arbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[b]arbaz", [["stylewithcss","false"],["strikethrough",""]], "foo[b]arbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["fooba[r]baz", [["stylewithcss","true"],["strikethrough",""]], "fooba[r]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["fooba[r]baz", [["stylewithcss","false"],["strikethrough",""]], "fooba[r]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["strikethrough",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","true"],["strikethrough",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","false"],["strikethrough",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["fo[ob]arbaz", [["strikethrough",""]], "foobarbaz", [true], {"strikethrough":[true,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","true"],["strikethrough",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","false"],["strikethrough",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","true"],["strikethrough",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",true,false,""]}], ["fo[ob]ar", [["stylewithcss","false"],["strikethrough",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",true,false,""]}], // Tests to remove only strikethrough from existing text-decoration ["abc[def]ghi", [["stylewithcss","true"],["strikethrough",""]], ["abc[def]ghi", "abc[def]ghi"], [true,true], {}], // blink, text-decoration-color and text-decoration-style values should be // dropped. This rule is odd because executing "underline" command causes // the data loss, but for now, the compatibility between browsers is more // important. Once you want/need to change the behavior of a browser, you // should file a spec issue first. // And these tests allows the difference between text-decoration vs. // text-decoration-line because these tests want to check the data loss. ["abc[def]ghi", [["stylewithcss","true"],["strikethrough",""]], ["abc[def]ghi", "abc[def]ghi"], [true,true], {}], ["abc[def]ghi", [["stylewithcss","true"],["strikethrough",""]], ["abc[def]ghi", "abc[def]ghi"], [true,true], {}], ["abc[def]ghi", [["stylewithcss","true"],["strikethrough",""]], ["abc[def]ghi", "abc[def]ghi"], [true,true], {}], ["abc[def]ghi", [["stylewithcss","true"],["strikethrough",""]], ["abc[def]ghi", "abc[def]ghi"], [true,true], {}], ]