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

Unified Diff: LayoutTests/editing/style/script-tests/push-down-font-styles.js

Issue 7973008: Revert 93001 - Apple-style-span class seems unnecessary (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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: LayoutTests/editing/style/script-tests/push-down-font-styles.js
===================================================================
--- LayoutTests/editing/style/script-tests/push-down-font-styles.js (revision 95747)
+++ LayoutTests/editing/style/script-tests/push-down-font-styles.js (working copy)
@@ -52,51 +52,51 @@
debug("Font size");
styleWithCSS = false;
-testSingleToggle("fontsize", 2, selectAll, 'hello world', '<font size="2">hello world</font>');
-testSingleToggle("fontsize", 4, selectAll, 'hello world', '<font size="4">hello world</font>');
-testSingleToggle("fontsize", 5, selectFirstWord, 'hello world', '<font size="5">hello</font> world');
+testSingleToggle("fontsize", 2, selectAll, 'hello world', '<font class="Apple-style-span" size="2">hello world</font>');
+testSingleToggle("fontsize", 4, selectAll, 'hello world', '<font class="Apple-style-span" size="4">hello world</font>');
+testSingleToggle("fontsize", 5, selectFirstWord, 'hello world', '<font class="Apple-style-span" size="5">hello</font> world');
testSingleToggle("fontsize", 3, selectFirstWord, '<font size="7">hello <div>world</div></font>', 'hello <div style="font-size: -webkit-xxx-large; ">world</div>');
testSingleToggle("fontsize", 3, selectFirstWord, '<font size="7"><div>hello</div><div>world</div></font>', '<div>hello</div><div style="font-size: -webkit-xxx-large; ">world</div>');
testSingleToggle("fontsize", 3, selectSecondWord, '<font size="7"><div>hello</div>world</font>', '<div style="font-size: -webkit-xxx-large; ">hello</div>world');
testSingleToggle("fontsize", 7, selectAll, '<font size="7"><div>hello</div>world</font>', '<font size="7"><div>hello</div>world</font>');
-testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font size="7">hello</font></div><font size="7">world</font>');
-testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font size="6">hello</font></div><font size="6">world</font>');
-testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font size="5">hello</font></div><font size="5">world</font>');
+testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="7">hello</font></div><font class="Apple-style-span" size="7">world</font>');
+testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="6">hello</font></div><font class="Apple-style-span" size="6">world</font>');
+testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="5">hello</font></div><font class="Apple-style-span" size="5">world</font>');
testSingleToggle("fontsize", 3, selectAll, '<font size="7"><div>hello</div>world</font>', '<div>hello</div>world');
testSingleToggle("fontsize", 3, selectAll, '<font size="3"><div>hello</div>world</font>', '<font size="3"><div>hello</div>world</font>');
-testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font size="1">hello</font></div><font size="1">world</font>');
+testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="1">hello</font></div><font class="Apple-style-span" size="1">world</font>');
debug("");
debug("Font size (with CSS)");
styleWithCSS = true;
testSingleToggle("fontsize", 7, selectAll, '<font size="7"><div>hello</div>world</font>', '<font size="7"><div>hello</div>world</font>');
-testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span style="font-size: -webkit-xxx-large;">hello</span></div><span style="font-size: -webkit-xxx-large;">world</span>');
-testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span style="font-size: xx-large;">hello</span></div><span style="font-size: xx-large;">world</span>');
-testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span style="font-size: x-large;">hello</span></div><span style="font-size: x-large;">world</span>');
+testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: -webkit-xxx-large;">hello</span></div><span class="Apple-style-span" style="font-size: -webkit-xxx-large;">world</span>');
+testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: xx-large;">hello</span></div><span class="Apple-style-span" style="font-size: xx-large;">world</span>');
+testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: x-large;">hello</span></div><span class="Apple-style-span" style="font-size: x-large;">world</span>');
testSingleToggle("fontsize", 3, selectAll, '<font size="7"><div>hello</div>world</font>', '<div>hello</div>world');
testSingleToggle("fontsize", 3, selectAll, '<font size="3"><div>hello</div>world</font>', '<font size="3"><div>hello</div>world</font>');
-testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span style="font-size: x-small;">hello</span></div><span style="font-size: x-small;">world</span>');
+testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: x-small;">hello</span></div><span class="Apple-style-span" style="font-size: x-small;">world</span>');
debug("");
debug("Font family");
styleWithCSS = false;
-testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<font face="Arial">hello world</font>');
-testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<font face="Arial">hello</font><font face="sans-serif"> world</font>');
-testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<font face="Arial">hello</font><div style="font-family: sans-serif; ">world</div>');
-testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<font face="sans-serif">hello</font><div><font face="Arial">world</font></div>');
+testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<font class="Apple-style-span" face="Arial">hello world</font>');
+testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<font class="Apple-style-span" face="Arial">hello</font><font face="sans-serif"> world</font>');
+testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<font class="Apple-style-span" face="Arial">hello</font><div style="font-family: sans-serif; ">world</div>');
+testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<font class="Apple-style-span" face="sans-serif">hello</font><div><font class="Apple-style-span" face="Arial">world</font></div>');
testSingleToggle("fontname", "Sans-Serif", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<font face="sans-serif"><div>hello</div><div>world</div></font>');
-testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><font face="Arial">hello</font></div><div><font face="Arial">world</font></div>');
+testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><font class="Apple-style-span" face="Arial">hello</font></div><div><font class="Apple-style-span" face="Arial">world</font></div>');
debug("");
debug("Font family (with CSS)");
styleWithCSS = true;
-testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<span style="font-family: Arial;">hello world</span>');
-testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<span style="font-family: Arial;">hello</span><font face="sans-serif"> world</font>');
-testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<span style="font-family: Arial;">hello</span><div style="font-family: sans-serif; ">world</div>');
-testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<span style="font-family: sans-serif;">hello</span><div><span style="font-family: Arial;">world</span></div>');
+testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<span class="Apple-style-span" style="font-family: Arial;">hello world</span>');
+testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<span class="Apple-style-span" style="font-family: Arial;">hello</span><font face="sans-serif"> world</font>');
+testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<span class="Apple-style-span" style="font-family: Arial;">hello</span><div style="font-family: sans-serif; ">world</div>');
+testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<span class="Apple-style-span" style="font-family: sans-serif;">hello</span><div><span class="Apple-style-span" style="font-family: Arial;">world</span></div>');
testSingleToggle("fontname", "Sans-Serif", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<font face="sans-serif"><div>hello</div><div>world</div></font>');
-testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><span style="font-family: Arial;">hello</span></div><div><span style="font-family: Arial;">world</span></div>');
+testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><span class="Apple-style-span" style="font-family: Arial;">hello</span></div><div><span class="Apple-style-span" style="font-family: Arial;">world</span></div>');
document.body.removeChild(testContainer);

Powered by Google App Engine
This is Rietveld 408576698