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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js
diff --git a/third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js b/third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js
index 98587299dc2c5da748fd6d7dc2a024556a51fbb2..7c491e5cd448804ca9220c174ab0e9bef8b0f457 100644
--- a/third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js
+++ b/third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js
@@ -21,27 +21,27 @@ function testSingleToggle(toggleCommand, initialContents, expectedContents)
}
-testSingleToggle("bold", '<span style="font-weight: 900;"> <div>text</div> </span>', ' <div>text</div> ');
-testSingleToggle("bold", '<span style="font-weight: 900;"><div>text</div></span>', '<div>text</div>');
-testSingleToggle("bold", '<span style="font-weight: 900;"><div id="test">hello</div><div>world</div></span>', '<div id="test">hello</div><div style="font-weight: 900;">world</div>');
-testSingleToggle("bold", '<div style="font-weight: bold;">hello<div id="test">world</div></div>', '<div><b>hello</b><div id="test">world</div></div>');
-testSingleToggle("bold", '<span style="font-weight: bold;">hello<span id="test">world</div></div>', '<b>hello</b><span id="test">world</span>');
-testSingleToggle("bold", '<span style="font-style: italic; font-weight: bold;">hello<span id="test">world</div></div>', '<span style="font-style: italic;"><b>hello</b><span id="test">world</span></span>');
+testSingleToggle("bold", '<span style="font-weight: 900;"> <div>text</div> </span>', ' <div style="">text</div> ');
+testSingleToggle("bold", '<span style="font-weight: 900;"><div>text</div></span>', '<div style="">text</div>');
+testSingleToggle("bold", '<span style="font-weight: 900;"><div id="test">hello</div><div>world</div></span>', '<div id="test" style="">hello</div><div style="font-weight: 900;">world</div>');
+testSingleToggle("bold", '<div style="font-weight: bold;">hello<div id="test">world</div></div>', '<div style=""><b>hello</b><div id="test" style="">world</div></div>');
+testSingleToggle("bold", '<span style="font-weight: bold;">hello<span id="test">world</div></div>', '<b>hello</b><span id="test" style="">world</span>');
+testSingleToggle("bold", '<span style="font-style: italic; font-weight: bold;">hello<span id="test">world</div></div>', '<span style="font-style: italic;"><b>hello</b><span id="test" style="">world</span></span>');
testSingleToggle("bold", '<span style="font-weight: bold;"><div id="test">hello</div><div style="font-weight: normal;"><div>world</div>webkit</div>', '<div id="test">hello</div><div>world</div>webkit');
-testSingleToggle("italic", '<span style="font-style: italic;"><div>hello</div></span>', '<div>hello</div>');
-testSingleToggle("italic", '<span style="font-style: italic;"><div id="test">hello</div><span style="font-style: oblique;">world</span>', '<div id="test">hello</div><span style="font-style: oblique;">world</span>');
-testSingleToggle("italic", '<span style="font-style: italic; font-weight: bold;"><div>hello</div></span>', '<span style="font-weight: bold;"><div>hello</div></span>');
-testSingleToggle("italic", '<span style="font-style: italic; text-decoration: line-through;"><div>hello</div></span>', '<span style="text-decoration: line-through;"><div>hello</div></span>');
-testSingleToggle("italic", '<span style="font-style: italic;">hello<div id="test">world</div><blockquote>webkit</blockquote></span>', '<i>hello</i><div id="test">world</div><blockquote style="font-style: italic;">webkit</blockquote>');
-testSingleToggle("italic", '<span style="font-style: italic;">hello <span id="test">world</span> webkit</span>', '<i>hello </i><span id="test">world</span><i> webkit</i>');
-testSingleToggle("underline", '<span style="text-decoration: underline;"><div id="test">hello</div>world</span>', '<div id="test">hello</div><u>world</u>');
-testSingleToggle("underline", '<span style="text-decoration: underline;"><div id="test">hello</div><blockquote>world<br>webkit</blockquote></span>', '<div id="test">hello</div><blockquote style="text-decoration-line: underline;">world<br>webkit</blockquote>');
-testSingleToggle("underline", '<span style="text-decoration: underline;">hello<div id="test">world</div>webkit</u>', '<u>hello</u><div id="test">world</div><u>webkit</u>');
+testSingleToggle("italic", '<span style="font-style: italic;"><div>hello</div></span>', '<div style="">hello</div>');
+testSingleToggle("italic", '<span style="font-style: italic;"><div id="test">hello</div><span style="font-style: oblique;">world</span>', '<div id="test" style="">hello</div><span style="font-style: oblique;">world</span>');
+testSingleToggle("italic", '<span style="font-style: italic; font-weight: bold;"><div>hello</div></span>', '<span style="font-weight: bold;"><div style="">hello</div></span>');
+testSingleToggle("italic", '<span style="font-style: italic; text-decoration: line-through;"><div>hello</div></span>', '<span style="text-decoration: line-through;"><div style="">hello</div></span>');
+testSingleToggle("italic", '<span style="font-style: italic;">hello<div id="test">world</div><blockquote>webkit</blockquote></span>', '<i>hello</i><div id="test" style="">world</div><blockquote style="font-style: italic;">webkit</blockquote>');
+testSingleToggle("italic", '<span style="font-style: italic;">hello <span id="test">world</span> webkit</span>', '<i>hello </i><span id="test" style="">world</span><i> webkit</i>');
+testSingleToggle("underline", '<span style="text-decoration: underline;"><div id="test">hello</div>world</span>', '<div id="test" style="">hello</div><u>world</u>');
+testSingleToggle("underline", '<span style="text-decoration: underline;"><div id="test">hello</div><blockquote>world<br>webkit</blockquote></span>', '<div id="test" style="">hello</div><blockquote style="text-decoration-line: underline;">world<br>webkit</blockquote>');
+testSingleToggle("underline", '<span style="text-decoration: underline;">hello<div id="test">world</div>webkit</u>', '<u>hello</u><div id="test" style="">world</div><u>webkit</u>');
testSingleToggle("underline",
'<div style="text-decoration: underline;"><div>hello</span></div><div id="test">webkit</div><span style="font-style: italic;">rocks</span>',
- '<div><div style="text-decoration-line: underline;">hello</span></div><div id="test">webkit</div><u><span style="font-style: italic;">rocks</span></u></div>');
-testSingleToggle("underline", '<span style="text-decoration-line: underline;"><div style="text-decoration-line: line-through;">hello</div><div id="test">world</div></span>', '<div style="text-decoration-line: underline line-through;">hello</div><div id="test">world</div>');
-testSingleToggle("strikeThrough", '<span style="text-decoration-line: line-through;"><div id="test">hello</div><div style="text-decoration-line: underline;">world</div></span>', '<div id="test">hello</div><div style="text-decoration-line: line-through underline;">world</div>');
+ '<div><div style="text-decoration-line: underline;">hello</span></div><div id="test" style="">webkit</div><u><span style="font-style: italic;">rocks</span></u></div>');
+testSingleToggle("underline", '<span style="text-decoration-line: underline;"><div style="text-decoration-line: line-through;">hello</div><div id="test">world</div></span>', '<div style="text-decoration-line: underline line-through;">hello</div><div id="test" style="">world</div>');
+testSingleToggle("strikeThrough", '<span style="text-decoration-line: line-through;"><div id="test">hello</div><div style="text-decoration-line: underline;">world</div></span>', '<div id="test" style="">hello</div><div style="text-decoration-line: line-through underline;">world</div>');
document.body.removeChild(testContainer);

Powered by Google App Engine
This is Rietveld 408576698