Skip to content

Commit f61a875

Browse files
committed
Tests: Added TCs picturing the broken remove style algorithm.
1 parent 0ce4033 commit f61a875

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/core/style/applyremove.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,9 @@
797797
t.a( '<p><i foo="2">this {is some sample} text</i></p>',
798798
'<p><i foo="2">this <b foo="1">is some sample</b> text</i></p>', 'tc8' );
799799

800+
t.r( '<p><b bar="3" foo="2">this {is some sample} text</b></p>',
801+
'<p><b bar="3" foo="2">this </b><b bar="3">is some sample</b><b bar="3" foo="2"> text</b></p>', 'tc2 - remove style step' );
802+
800803

801804
t = createAssertionFunction2( tcs, 'test apply inline style - do not duplicate with overridable styles - styles',
802805
{
@@ -829,6 +832,13 @@
829832
t.a( '<p><b style="font-size:8px;">this {is some sample} text</b></p>',
830833
'<p><b style="font-size:8px;">this <b style="font-size:20px;">is some sample</b> text</b></p>', 'tc6' );
831834

835+
t.r( '<p><b bar="3">this {is some sample} text</b></p>',
836+
'<p><b bar="3">this is some sample text</b></p>', 'tc4 - remove style step' );
837+
t.r( '<p><b style="font-color:red;">this {is some sample} text</b></p>',
838+
'<p><b style="font-color:red;">this is some sample text</b></p>', 'tc5 - remove style step' );
839+
t.r( '<p><b style="font-size:8px;">this {is some sample} text</b></p>',
840+
'<p><b style="font-size:8px;">this is some sample text</b></p>', 'tc6 - remove style step' );
841+
832842

833843
t = createAssertionFunction2( tcs, 'test apply inline style - do not duplicate with overridable styles - pattern',
834844
{
@@ -865,6 +875,13 @@
865875
t.a( '<p><i foo="2">this {is some sample} text</i></p>',
866876
'<p><i foo="2">this <b foo="1">is some sample</b> text</i></p>', 'tc8' );
867877

878+
t.r( '<p><b bar="3" foo="2">this {is some sample} text</b></p>',
879+
'<p><b bar="3" foo="2">this </b><b bar="3">is some sample</b><b bar="3" foo="2"> text</b></p>', 'tc3 - remove style step' );
880+
t.r( '<p><b style="font-size:12px;">this {is some sample} text</b></p>',
881+
'<p><b style="font-size:12px;">this </b>is some sample<b style="font-size:12px;"> text</b></p>', 'tc4 - remove style step' );
882+
t.r( '<p><b foo="2" style="font-size:12px;">this {is some sample} text</b></p>',
883+
'<p><b foo="2" style="font-size:12px;">this </b>is some sample<b foo="2" style="font-size:12px;"> text</b></p>', 'tc5 - remove style step' );
884+
868885

869886
//
870887
// Non-editable content ---------------------------------------------------

0 commit comments

Comments
 (0)