QUERYSTATE_TESTS = {
'id': 'QS',
'caption': 'queryCommandState Tests',
'checkAttrs': False,
'checkStyle': False,
'styleWithCSS': False,
'Proposed': [
{ 'desc': '',
'qcstate': '',
'tests': [
]
},
{ 'desc': 'query bold state',
'qcstate': 'bold',
'tests': [
{ 'id': 'B_TEXT_SI',
'rte1-id': 'q-bold-0',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'B_B-1_SI',
'rte1-id': 'q-bold-1',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'B_STRONG-1_SI',
'rte1-id': 'q-bold-2',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'B_SPANs:fw:b-1_SI',
'rte1-id': 'q-bold-3',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'B_SPANs:fw:n-1_SI',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'B_Bs:fw:n-1_SI',
'rte1-id': 'q-bold-4',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'B_B-SPANs:fw:n-1_SI',
'rte1-id': 'q-bold-5',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'B_SPAN.b-1-SI',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'B_MYB-1-SI',
'desc': 'query the "bold" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'S_STRIKE-1_SI',
'rte1-id': 'q-strikethrough-1',
'desc': 'query the "strikethrough" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'S_STRIKEs:td:n-1_SI',
'rte1-id': 'q-strikethrough-2',
'desc': 'query the "strikethrough" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'S_DEL-1_SI',
'rte1-id': 'q-strikethrough-4',
'desc': 'query the "strikethrough" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'S_SPANs:td:lt-1_SI',
'rte1-id': 'q-strikethrough-5',
'desc': 'query the "strikethrough" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'S_SPAN.s-1-SI',
'desc': 'query the "strikethrough" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'S_MYS-1-SI',
'desc': 'query the "strikethrough" state',
'pad': 'fo[obarb]az',
'expected': True }
]
},
{ 'desc': 'query subscript state',
'qcstate': 'subscript',
'tests': [
{ 'id': 'SUB_TEXT_SI',
'rte1-id': 'q-subscript-0',
'desc': 'query the "subscript" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'SUB_SUB-1_SI',
'rte1-id': 'q-subscript-1',
'desc': 'query the "subscript" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'SUB_SPAN.sub-1-SI',
'desc': 'query the "subscript" state',
'pad': 'foo[bar]baz',
'expected': True },
{ 'id': 'SUB_MYSUB-1-SI',
'desc': 'query the "subscript" state',
'pad': '
',
'expected': True },
{ 'id': 'IOL_UL_LI-1_SI',
'rte1-id': 'q-insertorderedlist-2',
'desc': 'query the "insertorderedlist" state',
'pad': '
',
'expected': False }
]
},
{ 'desc': 'query whether the selection is in an unordered list',
'qcstate': 'insertunorderedlist',
'tests': [
{ 'id': 'IUL_TEXT_SI',
'rte1-id': 'q-insertunorderedlist-0',
'desc': 'query the "insertunorderedlist" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'IUL_OL-LI-1_SI',
'rte1-id': 'q-insertunorderedlist-1',
'desc': 'query the "insertunorderedlist" state',
'pad': '
',
'expected': False },
{ 'id': 'IUL_UL-LI-1_SI',
'rte1-id': 'q-insertunorderedlist-2',
'desc': 'query the "insertunorderedlist" state',
'pad': '
',
'expected': True }
]
},
{ 'desc': 'query whether the paragraph is centered',
'qcstate': 'justifycenter',
'tests': [
{ 'id': 'JC_TEXT_SI',
'rte1-id': 'q-justifycenter-0',
'desc': 'query the "justifycenter" state',
'pad': 'foo[bar]baz',
'expected': False },
{ 'id': 'JC_DIVa:c-1_SI',
'rte1-id': 'q-justifycenter-1',
'desc': 'query the "justifycenter" state',
'pad': '
foo[bar]baz
', 'expected': True }, { 'id': 'JC_SPANs:ta:c-1_SI', 'rte1-id': 'q-justifycenter-3', 'desc': 'query the "justifycenter" state', 'pad': 'foo[bar]baz
', 'expected': True }, { 'id': 'JF_SPANs:ta:j-1_SI', 'rte1-id': 'q-justifyfull-3', 'desc': 'query the "justifyfull" state', 'pad': 'foo[bar]baz', 'expected': True }, { 'id': 'JF_SPAN.jf-1-SI', 'desc': 'query the "justifyfull" state', 'pad': 'foo[bar]baz', 'expected': True }, { 'id': 'JF_MYJF-1-SI', 'desc': 'query the "justifyfull" state', 'pad': 'foo[bar]baz
', 'expected': True }, { 'id': 'JL_SPANs:ta:l-1_SI', 'rte1-id': 'q-justifyleft-2', 'desc': 'query the "justifyleft" state', 'pad': 'foo[bar]baz', 'expected': True }, { 'id': 'JL_SPAN.jl-1-SI', 'desc': 'query the "justifyleft" state', 'pad': 'foo[bar]baz', 'expected': True }, { 'id': 'JL_MYJL-1-SI', 'desc': 'query the "justifyleft" state', 'pad': 'foo[bar]baz
', 'expected': True }, { 'id': 'JR_SPANs:ta:r-1_SI', 'rte1-id': 'q-justifyright-3', 'desc': 'query the "justifyright" state', 'pad': 'foo[bar]baz', 'expected': True }, { 'id': 'JR_SPAN.jr-1-SI', 'desc': 'query the "justifyright" state', 'pad': 'foo[bar]baz', 'expected': True }, { 'id': 'JR_MYJR-1-SI', 'desc': 'query the "justifyright" state', 'pad': '