// For documentation of the format, see README in this directory. var browserTests = [ ["foo[]bar", [["forecolor","#0000FF"]], "foo[]bar", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["

[foo

bar]

", [["stylewithcss","true"],["forecolor","#0000FF"]], "

[foo

bar]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["

[foo

bar]

", [["stylewithcss","false"],["forecolor","#0000FF"]], "

[foo

bar]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo bar]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo bar]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo bar]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo bar]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["

[foo

bar

baz]

", [["stylewithcss","true"],["forecolor","#0000FF"]], "

[foo

bar

baz]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["

[foo

bar

baz]

", [["stylewithcss","false"],["forecolor","#0000FF"]], "

[foo

bar

baz]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["

[foo


bar]", [["stylewithcss","true"],["forecolor","#0000FF"]], "

[foo


bar]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["

[foo


bar]", [["stylewithcss","false"],["forecolor","#0000FF"]], "

[foo


bar]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[]bar", [["forecolor","#0000FF"]], "foo[]bar", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[]bar", [["forecolor","#0000FF"]], "foo[]bar", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo{}bar", [["forecolor","#0000FF"]], "foo{}bar", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[]bar", [["forecolor","#0000FF"]], "foo[]bar", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[barbaz]qozquz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[barbaz]qozquz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[barbaz]qozquz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[barbaz]qozquz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[barbaz]qozquz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[barbaz]qozquz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[barbaz]qozquz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[barbaz]qozquz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["{

foo

}", [["stylewithcss","true"],["forecolor","#0000FF"]], "{

foo

}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["{

foo

}", [["stylewithcss","false"],["forecolor","#0000FF"]], "{

foo

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","blue"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","blue"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["forecolor","f"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["foo[bar]baz", [["forecolor","#f"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","00f"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","00f"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#00f"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#00f"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","0000ff"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","0000ff"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000ff"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000ff"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["forecolor","000000fff"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["foo[bar]baz", [["forecolor","#000000fff"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgb(0, 0, 255)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgb(0, 0, 255)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgb(0%, 0%, 100%)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgb(0%, 0%, 100%)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgb( 0 ,0 ,255)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgb( 0 ,0 ,255)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgba(0, 0, 255, 0.0)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgba(0, 0, 255, 0.0)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgb(15, -10, 375)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(15, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgb(15, -10, 375)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(15, 0, 255)"]}], ["foo[bar]baz", [["forecolor","rgba(0, 0, 0, 1)"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgba(255, 255, 255, 1)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 255, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgba(255, 255, 255, 1)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 255, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","rgba(0, 0, 255, 0.5)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0.5)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","rgba(0, 0, 255, 0.5)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0.5)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","hsl(240, 100%, 50%)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","hsl(240, 100%, 50%)"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","cornsilk"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 248, 220)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","cornsilk"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 248, 220)"]}], ["foo[bar]baz", [["forecolor","potato quiche"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","transparent"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","transparent"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"]}], ["foo[bar]baz", [["forecolor","currentColor"]], "foo[bar]baz", [false], {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}], ["
foob[a]rbaz
", [["stylewithcss","true"],["forecolor","#0000FF"]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foob[a]rbaz
", [["stylewithcss","false"],["forecolor","#0000FF"]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","true"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","false"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","true"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","false"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","true"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","false"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","true"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["
foobarbaz
", [["stylewithcss","false"],["forecolor","#0000FF"]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["{
foobarbaz
}", [["stylewithcss","true"],["forecolor","#0000FF"]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["{
foobarbaz
}", [["stylewithcss","false"],["forecolor","#0000FF"]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["foo{bar}baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo{bar}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["foo{bar}baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo{bar}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], // Once the inner style is updated, it has same style as the outer one. // Therefore, it may be okay to use the outer one is the only container of the // text nodes or it may be okay to split the outer one and keep 3 s. ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], ["foobarbaz", "foo[bar]baz"], [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], // Use the inner for the `style` attribute container. Then, the outer // should be split and may be serialized. ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], ["foobarbaz", "foobarbaz"], [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foob[ar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foob[ar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foob[ar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foob[ar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fooba[rba]z", [["stylewithcss","true"],["forecolor","#0000FF"]], "fooba[rba]z", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}], ["fooba[rba]z", [["stylewithcss","false"],["forecolor","#0000FF"]], "fooba[rba]z", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}], // XXX Looks like that there is no good solution for this case because id=purple // may affect the style, but it's unclear for builtin editors of the browsers. ["foob[a]rbaz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}], ["foob[a]rbaz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foob[a]rbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["forecolor","blue"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["forecolor","#0000ff"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["forecolor","rgb(0,0,255)"]], "foo[bar]baz", [true], {"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgba(0, 0, 255, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgba(0, 0, 255, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(15, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(15, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(255, 255, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(255, 255, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgba(0, 0, 255, 0.5)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgba(0, 0, 255, 0.5)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(255, 248, 220)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(255, 248, 220)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","true"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["[foo]", [["stylewithcss","false"],["forecolor","#0000FF"]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["fo[ob]arbaz", [["stylewithcss","true"],["forecolor","#0000FF"]], "fo[ob]arbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["fo[ob]arbaz", [["stylewithcss","false"],["forecolor","#0000FF"]], "fo[ob]arbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["fooba[rb]az", [["stylewithcss","true"],["forecolor","#0000FF"]], "fooba[rb]az", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fooba[rb]az", [["stylewithcss","false"],["forecolor","#0000FF"]], "fooba[rb]az", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fo[obarb]az", [["stylewithcss","true"],["forecolor","#0000FF"]], "fo[obarb]az", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["fo[obarb]az", [["stylewithcss","false"],["forecolor","#0000FF"]], "fo[obarb]az", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}], ["foo[b]arbaz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[b]arbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[b]arbaz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[b]arbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fooba[r]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "fooba[r]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fooba[r]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "fooba[r]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo[bar]baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo{bar}baz", [["stylewithcss","true"],["forecolor","#0000FF"]], "foo{bar}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["foo{bar}baz", [["stylewithcss","false"],["forecolor","#0000FF"]], "foo{bar}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fo[ob]ar", [["stylewithcss","true"],["forecolor","#0000FF"]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fo[ob]ar", [["stylewithcss","false"],["forecolor","#0000FF"]], "foobar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fo[ob]ar", [["stylewithcss","true"],["forecolor","#0000FF"]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], ["fo[ob]ar", [["stylewithcss","false"],["forecolor","#0000FF"]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}], // If contents of are entirely selected, it should be reused. ["[abc]", [["styleWithCSS","false"],["foreColor","#ff0000"]], ["[abc]", "[abc]"], [true,true], {}], ["[abc]", [["styleWithCSS","false"],["foreColor","#ff0000"]], ["[abc]", "[abc]"], [true,true], {}], ["[abc]", [["styleWithCSS","false"],["foreColor","#ff0000"]], ["[abc]", "[abc]", "[abc]", "[abc]", "[abc]", "[abc]"], [true,true], {}], // but don't split existing if partially selected. ["[a]bc", [["styleWithCSS","false"],["foreColor","#ff0000"]], "[a]bc", [true,true], {}], ["ab[c]", [["styleWithCSS","false"],["foreColor","#ff0000"]], "ab[c]", [true,true], {}], ["[a]bc", [["styleWithCSS","false"],["foreColor","#ff0000"]], "[a]bc", [true,true], {}], ["ab[c]", [["styleWithCSS","false"],["foreColor","#ff0000"]], "ab[c]", [true,true], {}], // When typing text, `styleWithCSS` value may have been changed at setting the // style. In the cases, consider to use HTML or CSS style when typing text, // but if it's impossible to set with ``, use // `` even if `styleWithCSS` is "false". ["a[]c", [["styleWithCSS","true"],["foreColor","#0000FF"],["styleWithCSS","false"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","true"],["foreColor","rgb(0, 0, 255)"],["styleWithCSS","false"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","true"],["foreColor","rgba(0, 0, 255, 0.5)"],["styleWithCSS","false"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","true"],["foreColor","transparent"],["styleWithCSS","false"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","false"],["foreColor","#0000FF"],["styleWithCSS","true"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","false"],["foreColor","rgb(0, 0, 255)"],["styleWithCSS","true"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","false"],["foreColor","rgba(0, 0, 255, 0.5)"],["styleWithCSS","true"],["insertText","b"]], "abc", [true,true,true,true], {}], ["a[]c", [["styleWithCSS","false"],["foreColor","transparent"],["styleWithCSS","true"],["insertText","b"]], "abc", [true,true,true,true], {}], ]