Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/undo/remove-css-property-and-remove-style-expected.txt

Issue 2800723002: Ensure we never remove the style attribute when syncing it from CSSOM. (Closed)
Patch Set: Nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 This tests removing style attribute after removing CSS property. Undo should bri ng back the CSS property we removed. 1 This tests removing style after removing CSS property. Undo should bring back th e CSS property we removed.
2 2
3 Initially "test" should be bold wrapped with a span: 3 Initially "test" should be bold wrapped with a span:
4 | <span> 4 | <span>
5 | style="font-weight: 900;" 5 | style="font-weight: 900;"
6 | "test" 6 | "test"
7 7
8 Unbolding should remove the CSS style and also remove the span: 8 Unbolding should remove the CSS style and also remove the span:
9 | "<#selection-anchor>test<#selection-focus>" 9 | "<#selection-anchor>test<#selection-focus>"
10 10
11 Undo should bring back both the span and style attribute so that "test" is once again bold: 11 Undo should bring back both the span and style so that "test" is once again bold :
12 | <span> 12 | <span>
13 | style="font-weight: 900;" 13 | style="font-weight: 900;"
14 | "<#selection-anchor>test<#selection-focus>" 14 | "<#selection-anchor>test<#selection-focus>"
15 15
16 Redo should unbold "test" and there should be no span: 16 Redo should unbold "test" and there should be no span:
17 | "<#selection-anchor>test<#selection-focus>" 17 | "<#selection-anchor>test<#selection-focus>"
18 18
19 Undo once more: 19 Undo once more:
20 | <span> 20 | <span>
21 | style="font-weight: 900;" 21 | style="font-weight: 900;"
22 | "<#selection-anchor>test<#selection-focus>" 22 | "<#selection-anchor>test<#selection-focus>"
23 23
24 Reset, and added id and title: 24 Reset, and added id and title:
25 | <span> 25 | <span>
26 | id="test_span" 26 | id="test_span"
27 | style="font-weight: 900;" 27 | style="font-weight: 900;"
28 | title="hello, world" 28 | title="hello, world"
29 | "test" 29 | "test"
30 30
31 Unbolding should remove the CSS style but shouldn't remove the span: 31 Unbolding should remove the CSS style but shouldn't remove the span:
32 | <span> 32 | <span>
33 | id="test_span" 33 | id="test_span"
34 | style=""
34 | title="hello, world" 35 | title="hello, world"
35 | "<#selection-anchor>test<#selection-focus>" 36 | "<#selection-anchor>test<#selection-focus>"
36 37
37 Undo should restore the style attribute and "test" should be bold: 38 Undo should restore the style and "test" should be bold:
38 | <span> 39 | <span>
39 | id="test_span" 40 | id="test_span"
40 | style="font-weight: 900;" 41 | style="font-weight: 900;"
41 | title="hello, world" 42 | title="hello, world"
42 | "<#selection-anchor>test<#selection-focus>" 43 | "<#selection-anchor>test<#selection-focus>"
43 44
44 Redo should remove the style attribute again: 45 Redo should remove the style again:
45 | <span> 46 | <span>
46 | id="test_span" 47 | id="test_span"
48 | style=""
47 | title="hello, world" 49 | title="hello, world"
48 | "<#selection-anchor>test<#selection-focus>" 50 | "<#selection-anchor>test<#selection-focus>"
49 51
50 Reset, and added color:blue: 52 Reset, and added color:blue:
51 | <span> 53 | <span>
52 | style="font-weight: 900; color: blue;" 54 | style="font-weight: 900; color: blue;"
53 | "test" 55 | "test"
54 56
55 Unbolding should remove the font-weight but shouldn't remove the style attribute : 57 Unbolding should remove the font-weight but shouldn't remove the style :
56 | <span> 58 | <span>
57 | style="color: blue;" 59 | style="color: blue;"
58 | "<#selection-anchor>test<#selection-focus>" 60 | "<#selection-anchor>test<#selection-focus>"
59 61
60 Undo should reset the style attribute so that "test" is both bold and blue: 62 Undo should reset the style so that "test" is both bold and blue:
61 | <span> 63 | <span>
62 | style="color: blue; font-weight: 900;" 64 | style="color: blue; font-weight: 900;"
63 | "<#selection-anchor>test<#selection-focus>" 65 | "<#selection-anchor>test<#selection-focus>"
64 66
65 Redo should only remove font-weight and leave "test" blue: 67 Redo should only remove font-weight and leave "test" blue:
66 | <span> 68 | <span>
67 | style="color: blue;" 69 | style="color: blue;"
68 | "<#selection-anchor>test<#selection-focus>" 70 | "<#selection-anchor>test<#selection-focus>"
69 71
70 Setting the forecolor to black should remove both the style attribute and the sp an: 72 Setting the forecolor to black should remove both the style and the span:
71 | "<#selection-anchor>test<#selection-focus>" 73 | "<#selection-anchor>test<#selection-focus>"
72 74
73 Undo should make "test" blue again: 75 Undo should make "test" blue again:
74 | <span> 76 | <span>
75 | style="color: blue;" 77 | style="color: blue;"
76 | "<#selection-anchor>test<#selection-focus>" 78 | "<#selection-anchor>test<#selection-focus>"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698