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

', 'expected': [ '

[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[barbazquoz]', 'expected': 'foo[barbazquoz]' }, { 'id': 'U_U-S-2_SI', 'desc': 'Removing underline from striked content inside underlined content', 'pad': 'foo[bar]bazquoz', 'expected': 'foo[bar]bazquoz' }, { 'id': 'U_U-P3-1_SO', 'desc': 'Removing underline from underlined content with content-model violation', 'pad': '

foo

{

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 tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_S-1_SO', 'desc': 'Selection outside of tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_S-1_SL', 'desc': 'Selection oblique left; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_S-1_SR', 'desc': 'Selection oblique right; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_STRIKE-1_SW', 'rte1-id': 'u-strikethrough-0', 'desc': 'Selection within tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_STRIKE-1_SO', 'desc': 'Selection outside of tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_STRIKE-1_SL', 'desc': 'Selection oblique left; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_STRIKE-2_SR', 'desc': 'Selection oblique right; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_DEL-1_SW', 'rte1-id': 'u-strikethrough-2', 'desc': 'Selection within tags; remove tags', 'pad': 'foo[bar]baz' }, { 'id': 'S_SPANs:td:lt-1_SW', 'rte1-id': 'u-strikethrough-3', 'desc': 'Selection within tags; remove "text-decoration:line-through"', 'pad': 'foo[bar]baz' }, { 'id': 'S_SPANs:td:lt-1_SO', 'desc': 'Selection outside of tags; Italicize "text-decoration:line-through"', 'pad': 'foo[bar]baz' }, { 'id': 'S_SPANs:td:lt-1_SL', 'desc': 'Selection oblique left; Italicize "text-decoration:line-through"', 'pad': 'foo[bar]baz' }, { 'id': 'S_SPANs:td:lt-1_SR', 'desc': 'Selection oblique right; Italicize "text-decoration:line-through"', 'pad': 'foo[bar]baz' }, { 'id': 'S_S-U-1_SI', 'desc': 'Removing underline from underlined content inside striked content', 'pad': 'foo[bar]bazquoz', 'expected': 'foo[bar]bazquoz' }, { 'id': 'S_U-S-1_SI', 'desc': 'Removing underline from striked content inside underlined content', 'pad': 'foo[bar]bazquoz', 'expected': 'foo[bar]bazquoz' } ] }, { 'desc': 'remove subscript', 'command': 'subscript', 'tests': [ { 'id': 'SUB_SUB-1_SW', 'rte1-id': 'u-subscript-0', 'desc': 'remove subscript', 'pad': 'foo[bar]baz' }, { 'id': 'SUB_SPANs:va:sub-1_SW', 'rte1-id': 'u-subscript-1', 'desc': 'remove subscript', 'pad': 'foo[bar]baz' } ] }, { 'desc': 'remove superscript', 'command': 'superscript', 'tests': [ { 'id': 'SUP_SUP-1_SW', 'rte1-id': 'u-superscript-0', 'desc': 'remove superscript', 'pad': 'foo[bar]baz' }, { 'id': 'SUP_SPANs:va:super-1_SW', 'rte1-id': 'u-superscript-1', 'desc': 'remove superscript', 'pad': 'foo[bar]baz' } ] }, { 'desc': 'remove links', 'command': 'unlink', 'tests': [ { 'id': 'UNLINK_Ahref:url-1_SW', 'rte1-id': 'u-unlink-0', 'desc': 'unlink an element with href attribute where all children are selected', 'pad': 'foo[bar]baz' }, { 'id': 'UNLINK_A-1_SC', 'desc': 'unlink an element that contains the collapsed selection', 'pad': 'fooba^rbaz', 'expected': 'fooba^rbaz' }, { 'id': 'UNLINK_A-1_SI', 'desc': 'unlink an element that contains the whole selection', 'pad': 'foob[a]rbaz', 'expected': 'foob[a]rbaz' }, { 'id': 'UNLINK_A-2_SL', 'desc': 'unlink a partially contained element', 'pad': 'foo[bar]baz' }, { 'id': 'UNLINK_A-3_SR', 'desc': 'unlink a partially contained element', 'pad': 'foo[bar]baz' }, { 'id': 'UNLINK_As:d:b.fw:b-1_SW', 'desc': 'unlink, preserving styles', 'pad': 'foo[bar]baz', 'expected': 'foo[bar]baz' }, { 'id': 'UNLINK_A-IMG-1_SO', 'desc': 'unlink a linked image at the start of the content', 'pad': '{abc]', 'expected': '{abc]' } ] }, { 'desc': 'outdent', 'command': 'outdent', 'tests': [ { 'id': 'OUTDENT_BQ-1_SW', 'rte1-id': 'u-outdent-0', 'desc': 'outdent (remove) a
', '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': 'foo
  1. [bar]
baz', 'expected': [ 'foo

[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': 'foo
  • [bar]
baz', 'expected': [ 'foo

[bar]

baz', 'foo
[bar]
baz' ], 'accept': 'foo
[bar]
baz' }, { 'id': 'OUTDENT_DIV-1_SW', 'rte1-id': 'u-outdent-4', 'desc': 'outdent (remove) a styled
with 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': 'foo
[bar]
baz', 'expected': [ 'foo

[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' } ] } ] }