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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic-mixed-editability.html

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 <!doctype html> 1 <!doctype html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script> 4 <script src="../assert_selection.js"></script>
5 <script> 5 <script>
6 test(() => assert_selection( 6 test(() => assert_selection(
7 [ 7 [
8 '<div contenteditable>', 8 '<div contenteditable>',
9 '^abc <span contenteditable="false">def</span> ghi|', 9 '^abc <span contenteditable="false">def</span> ghi|',
10 '</div>', 10 '</div>',
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 '^abc <span contenteditable="false">def</span> ghi|', 42 '^abc <span contenteditable="false">def</span> ghi|',
43 '</div>', 43 '</div>',
44 ].join(''), 44 ].join(''),
45 selection => { 45 selection => {
46 selection.document.execCommand('bold'); 46 selection.document.execCommand('bold');
47 selection.document.execCommand('italic'); 47 selection.document.execCommand('italic');
48 selection.document.execCommand('bold'); 48 selection.document.execCommand('bold');
49 }, 49 },
50 [ 50 [
51 '<div contenteditable>', 51 '<div contenteditable>',
52 '<i>^abc </i>', 52 '<i style>^abc </i>',
53 '<span contenteditable="false">def</span>', 53 '<span contenteditable="false">def</span>',
54 '<i> ghi|</i>', 54 '<i style> ghi|</i>',
55 '</div>', 55 '</div>',
56 ].join('')), 56 ].join('')),
57 'bold+italic+bold'); 57 'bold+italic+bold');
58 58
59 test(() => assert_selection( 59 test(() => assert_selection(
60 [ 60 [
61 '<div contenteditable>', 61 '<div contenteditable>',
62 '^abc <span contenteditable="false">def</span> ghi|', 62 '^abc <span contenteditable="false">def</span> ghi|',
63 '</div>', 63 '</div>',
64 ].join(''), 64 ].join(''),
65 selection => { 65 selection => {
66 selection.document.execCommand('bold'); 66 selection.document.execCommand('bold');
67 selection.document.execCommand('italic'); 67 selection.document.execCommand('italic');
68 selection.document.execCommand('bold'); 68 selection.document.execCommand('bold');
69 selection.document.execCommand('italic'); 69 selection.document.execCommand('italic');
70 }, 70 },
71 [ 71 [
72 '<div contenteditable>', 72 '<div contenteditable>',
73 '^abc <span contenteditable="false">def</span> ghi|', 73 '^abc <span contenteditable="false">def</span> ghi|',
74 '</div>', 74 '</div>',
75 ].join('')), 75 ].join('')),
76 'bold+italic+bold+italic'); 76 'bold+italic+bold+italic');
77 </script> 77 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698