blob: 115355b76be108a6c284c23a2992309b2835a91c [file] [log] [blame]
This tests removing style attribute after removing CSS property. Undo should bring back the CSS property we removed.
Initially "test" should be bold wrapped with a span:
| <span>
| style="font-weight: 900;"
| "test"
Unbolding should remove the CSS style and also remove the span:
| "<#selection-anchor>test<#selection-focus>"
Undo should bring back both the span and style attribute so that "test" is once again bold:
| <span>
| style="font-weight: 900;"
| "<#selection-anchor>test<#selection-focus>"
Redo should unbold "test" and there should be no span:
| "<#selection-anchor>test<#selection-focus>"
Undo once more:
| <span>
| style="font-weight: 900;"
| "<#selection-anchor>test<#selection-focus>"
Reset, and added id and title:
| <span>
| id="test_span"
| style="font-weight: 900;"
| title="hello, world"
| "<#selection-anchor>test<#selection-focus>"
Unbolding should remove the CSS style but shouldn't remove the span:
| <span>
| id="test_span"
| title="hello, world"
| "<#selection-anchor>test<#selection-focus>"
Undo should restore the style attribute and "test" should be bold:
| <span>
| id="test_span"
| style="font-weight: 900;"
| title="hello, world"
| "<#selection-anchor>test<#selection-focus>"
Redo should remove the style attribute again:
| <span>
| id="test_span"
| title="hello, world"
| "<#selection-anchor>test<#selection-focus>"
Reset, and added color:blue:
| <span>
| style="font-weight: 900; color: blue;"
| "<#selection-anchor>test<#selection-focus>"
Unbolding should remove the font-weight but shouldn't remove the style attribute:
| <span>
| style="color: blue;"
| "<#selection-anchor>test<#selection-focus>"
Undo should reset the style attribute so that "test" is both bold and blue:
| <span>
| style="font-weight: 900; color: blue;"
| "<#selection-anchor>test<#selection-focus>"
Redo should only remove font-weight and leave "test" blue:
| <span>
| style="color: blue;"
| "<#selection-anchor>test<#selection-focus>"
Setting the forecolor to black should remove both the style attribute and the span:
| "<#selection-anchor>test<#selection-focus>"
Undo should make "test" blue again:
| <span>
| style="color: blue;"
| "<#selection-anchor>test<#selection-focus>"