UNAPPLY_TESTS = {
'id': 'U',
'caption': 'Unapply Existing Formatting Tests',
'checkAttrs': True,
'checkStyle': True,
'styleWithCSS': False,
'expected': 'foo[bar]baz',
'RFC': [
{ 'desc': '',
'command': '',
'tests': [
]
},
{ 'desc': 'remove link',
'command': 'unlink',
'tests': [
{ 'id': 'UNLINK_A-1_SO',
'desc': 'unlink wrapped element',
'pad': 'foo[bar]baz' },
{ 'id': 'UNLINK_A-1_SW',
'desc': 'unlink element where the selection wraps the full content',
'pad': 'foo[bar]baz' },
{ 'id': 'UNLINK_An:a.h:id-1_SO',
'desc': 'unlink wrapped element that has a name and href attribute',
'pad': 'foo[bar]baz' },
{ 'id': 'UNLINK_A-2_SO',
'desc': 'unlink contained element',
'pad': 'foo[bar]baz' },
{ 'id': 'UNLINK_A2-1_SO',
'desc': 'unlink 2 contained elements',
'pad': 'foo[bar]baz' }
]
}
],
'Proposed': [
{ 'desc': '',
'command': '',
'tests': [
]
},
{ 'desc': 'remove bold',
'command': 'bold',
'tests': [
{ 'id': 'B_B-1_SW',
'rte1-id': 'u-bold-0',
'desc': 'Selection within tags; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_B-1_SO',
'desc': 'Selection outside of tags; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_B-1_SL',
'desc': 'Selection oblique left; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_B-1_SR',
'desc': 'Selection oblique right; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_STRONG-1_SW',
'rte1-id': 'u-bold-1',
'desc': 'Selection within tags; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_STRONG-1_SO',
'desc': 'Selection outside of tags; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_STRONG-1_SL',
'desc': 'Selection oblique left; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_STRONG-1_SR',
'desc': 'Selection oblique right; remove tags',
'pad': 'foo[bar]baz' },
{ 'id': 'B_SPANs:fw:b-1_SW',
'rte1-id': 'u-bold-2',
'desc': 'Selection within tags; remove "font-weight: bold"',
'pad': 'foo[bar]baz' },
{ 'id': 'B_SPANs:fw:b-1_SO',
'desc': 'Selection outside of tags; remove "font-weight: bold"',
'pad': 'foo[bar]baz' },
{ 'id': 'B_SPANs:fw:b-1_SL',
'desc': 'Selection oblique left; remove "font-weight: bold"',
'pad': 'foo[bar]baz' },
{ 'id': 'B_SPANs:fw:b-1_SR',
'desc': 'Selection oblique right; remove "font-weight: bold"',
'pad': 'foo[bar]baz' },
{ 'id': 'B_B-P3-1_SO12',
'desc': 'Unbolding multiple paragraphs in inside bolded content with content-model violation',
'pad': '{ foo bar baz
[foo
bar]
baz
', '[foo
bar]
baz
' ] }, { 'id': 'B_B-P-I..P-1_SO-I', 'desc': 'Unbolding italicized content inside bolded content with content-model violation', 'pad': 'foo[bar]
baz
', 'expected': [ 'foo[bar]
baz
', 'foo
[bar]
baz
' ] }, { 'id': 'B_B-2_SL', 'desc': 'Remove partially covered bold, selection extends left', 'pad': 'foo [bar baz] qoz quz sic', 'expected': 'foo [bar baz] qoz quz sic' }, { 'id': 'B_B-2_SR', 'desc': 'Remove partially covered bold, selection extends right', 'pad': 'foo bar baz [qoz quz] sic', 'expected': 'foo bar baz [qoz quz] sic' } ] }, { 'desc': 'remove italic', 'command': 'italic', 'tests': [ { 'id': 'I_I-1_SW', 'rte1-id': 'u-italic-0', 'desc': 'Selection within tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_I-1_SO', 'desc': 'Selection outside of tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_I-1_SL', 'desc': 'Selection oblique left; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_I-1_SR', 'desc': 'Selection oblique right; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_EM-1_SW', 'rte1-id': 'u-italic-1', 'desc': 'Selection within tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_EM-1_SO', 'desc': 'Selection outside of tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_EM-1_SL', 'desc': 'Selection oblique left; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_EM-1_SR', 'desc': 'Selection oblique right; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'I_SPANs:fs:i-1_SW', 'rte1-id': 'u-italic-2', 'desc': 'Selection within tags; remove "font-style: italic"', 'pad': 'foo[bar]baz' }, { 'id': 'I_SPANs:fs:i-1_SO', 'desc': 'Selection outside of tags; Italicize "font-style: italic"', 'pad': 'foo[bar]baz' }, { 'id': 'I_SPANs:fs:i-1_SL', 'desc': 'Selection oblique left; Italicize "font-style: italic"', 'pad': 'foo[bar]baz' }, { 'id': 'I_SPANs:fs:i-1_SR', 'desc': 'Selection oblique right; Italicize "font-style: italic"', 'pad': 'foo[bar]baz' }, { 'id': 'I_I-P3-1_SO2', 'desc': 'Unitalicize content with content-model violation', 'pad': 'foo
{bar
}baz
', 'expected': [ 'foo
[bar]
baz
', 'foo
[bar]
baz
' ] } ] }, { 'desc': 'remove underline', 'command': 'underline', 'tests': [ { 'id': 'U_U-1_SW', 'rte1-id': 'u-underline-0', 'desc': 'Selection within tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'U_U-1_SO', 'desc': 'Selection outside of tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'U_U-1_SL', 'desc': 'Selection oblique left; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'U_U-1_SR', 'desc': 'Selection oblique right; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'U_SPANs:td:u-1_SW', 'rte1-id': 'u-underline-1', 'desc': 'Selection within tags; remove "text-decoration: underline"', 'pad': 'foo[bar]baz' }, { 'id': 'U_SPANs:td:u-1_SO', 'desc': 'Selection outside of tags; remove "text-decoration: underline"', 'pad': 'foo[bar]baz' }, { 'id': 'U_SPANs:td:u-1_SL', 'desc': 'Selection oblique left; remove "text-decoration: underline"', 'pad': 'foo[bar]baz' }, { 'id': 'U_SPANs:td:u-1_SR', 'desc': 'Selection oblique right; remove "text-decoration: underline"', 'pad': 'foo[bar]baz' }, { 'id': 'U_U-S-1_SO', 'desc': 'Removing underline from underlined content with striked content', 'pad': 'foo[barfoo
{bar
}baz
', 'expected': [ 'foo
[bar]
baz
', 'foo
[bar]
baz
' ] } ] }, { 'desc': 'remove strike through', 'command': 'strikethrough', 'tests': [ { 'id': 'S_S-1_SW', 'rte1-id': 'u-strikethrough-1', 'desc': 'Selection within tags; remove', 'pad': 'foo[bar]baz', 'expected': [ 'foo[bar]
baz', 'foo[bar]baz' ], 'accept': 'foo
[bar]
baz' }, { 'id': 'OUTDENT_BQ.wibq.s:m:00040.b:n.p:0-1_SW', 'rte1-id': 'u-outdent-1', 'desc': 'outdent (remove) a styled', 'pad': 'foo[bar]baz', 'expected': [ 'foo[bar]
baz', 'foo[bar]baz' ], 'accept': 'foo
[bar]
baz' }, { 'id': 'OUTDENT_OL-LI-1_SW', 'rte1-id': 'u-outdent-3', 'desc': 'outdent (remove) an ordered list', 'pad': 'foobaz', 'expected': [ 'foo
- [bar]
[bar]
baz', 'foo[bar]baz' ], 'accept': 'foo
[bar]
baz' }, { 'id': 'OUTDENT_UL-LI-1_SW', 'rte1-id': 'u-outdent-2', 'desc': 'outdent (remove) an unordered list', 'pad': 'foobaz', 'expected': [ 'foo
- [bar]
[bar]
baz', 'foo[bar]baz' ], 'accept': 'foo
[bar]
baz' }, { 'id': 'OUTDENT_DIV-1_SW', 'rte1-id': 'u-outdent-4', 'desc': 'outdent (remove) a styledwith margin', 'pad': 'foo[bar]baz', 'expected': [ 'foo[bar]
baz', 'foo[bar]baz' ], 'accept': 'foo
[bar]
baz' } ] }, { 'desc': 'remove all formatting', 'command': 'removeformat', 'tests': [ { 'id': 'REMOVEFORMAT_B-1_SW', 'rte1-id': 'u-removeformat-0', 'desc': 'remove a tag using "removeformat"', 'pad': 'foo[bar]baz' }, { 'id': 'REMOVEFORMAT_Ahref:url-1_SW', 'rte1-id': 'u-removeformat-0', 'desc': 'remove a link using "removeformat"', 'pad': 'foo[bar]baz' }, { 'id': 'REMOVEFORMAT_TABLE-TBODY-TR-TD-1_SW', 'rte1-id': 'u-removeformat-2', 'desc': 'remove a table using "removeformat"', 'pad': 'foobaz', 'expected': [ 'foo
[bar] [bar]
baz', 'foo[bar]baz' ], 'accept': 'foo
[bar]
baz' } ] }, { 'desc': 'remove bookmark', 'command': 'unbookmark', 'tests': [ { 'id': 'UNBOOKMARK_An:name-1_SW', 'rte1-id': 'u-unbookmark-0', 'desc': 'unlink a bookmark (a named element) where all children are selected', 'pad': 'foo[bar]baz' } ] } ] }