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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.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 ' <div>abc def</div>', 9 ' <div>abc def</div>',
10 ' <p>ghi jkl|</p>', 10 ' <p>ghi jkl|</p>',
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ' <p>ghi jkl|</p>', 45 ' <p>ghi jkl|</p>',
46 '</div>', 46 '</div>',
47 ].join('\n'), 47 ].join('\n'),
48 selection => { 48 selection => {
49 selection.document.execCommand('bold'); 49 selection.document.execCommand('bold');
50 selection.document.execCommand('italic'); 50 selection.document.execCommand('italic');
51 selection.document.execCommand('bold'); 51 selection.document.execCommand('bold');
52 }, 52 },
53 [ 53 [
54 '<div contenteditable>', 54 '<div contenteditable>',
55 ' <div><i>^abc def</i></div>', 55 ' <div><i style>^abc def</i></div>',
56 ' <p><i>ghi jkl|</i></p>', 56 ' <p><i style>ghi jkl|</i></p>',
57 '</div>', 57 '</div>',
58 ].join('\n')), 58 ].join('\n')),
59 'bold+italic+bold'); 59 'bold+italic+bold');
60 60
61 test(() => assert_selection( 61 test(() => assert_selection(
62 [ 62 [
63 '<div contenteditable>^', 63 '<div contenteditable>^',
64 ' <div>abc def</div>', 64 ' <div>abc def</div>',
65 ' <p>ghi jkl|</p>', 65 ' <p>ghi jkl|</p>',
66 '</div>', 66 '</div>',
67 ].join('\n'), 67 ].join('\n'),
68 selection => { 68 selection => {
69 selection.document.execCommand('bold'); 69 selection.document.execCommand('bold');
70 selection.document.execCommand('italic'); 70 selection.document.execCommand('italic');
71 selection.document.execCommand('bold'); 71 selection.document.execCommand('bold');
72 selection.document.execCommand('italic'); 72 selection.document.execCommand('italic');
73 }, 73 },
74 [ 74 [
75 '<div contenteditable>', 75 '<div contenteditable>',
76 ' <div>^abc def</div>', 76 ' <div>^abc def</div>',
77 ' <p>ghi jkl|</p>', 77 ' <p>ghi jkl|</p>',
78 '</div>', 78 '</div>',
79 ].join('\n')), 79 ].join('\n')),
80 'bold+italic+bold+italic'); 80 'bold+italic+bold+italic');
81 </script> 81 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698