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

Side by Side Diff: LayoutTests/editing/style/script-tests/push-down-inline-styles.js

Issue 20262002: [css3-text] Implement text-decoration property shorthand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed expectation for last-minute, newly added tests in revision 155705 Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 description('Test to make sure we push down inline styles properly.'); 1 description('Test to make sure we push down inline styles properly.');
2 2
3 var testContainer = document.createElement("div"); 3 var testContainer = document.createElement("div");
4 testContainer.contentEditable = true; 4 testContainer.contentEditable = true;
5 document.body.appendChild(testContainer); 5 document.body.appendChild(testContainer);
6 6
7 function testSingleToggle(toggleCommand, initialContents, expectedContents) 7 function testSingleToggle(toggleCommand, initialContents, expectedContents)
8 { 8 {
9 testContainer.innerHTML = initialContents; 9 testContainer.innerHTML = initialContents;
10 if (document.getElementById('test')) 10 if (document.getElementById('test'))
(...skipping 13 matching lines...) Expand all
24 testSingleToggle("bold", '<span style="font-weight: 900;"> <div>text</div> </spa n>', ' <div>text</div> '); 24 testSingleToggle("bold", '<span style="font-weight: 900;"> <div>text</div> </spa n>', ' <div>text</div> ');
25 testSingleToggle("bold", '<span style="font-weight: 900;"><div>text</div></span> ', '<div>text</div>'); 25 testSingleToggle("bold", '<span style="font-weight: 900;"><div>text</div></span> ', '<div>text</div>');
26 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>'); 26 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>');
27 testSingleToggle("bold", '<div style="font-weight: bold;">hello<div id="test">wo rld</div></div>', '<div><b>hello</b><div id="test">world</div></div>'); 27 testSingleToggle("bold", '<div style="font-weight: bold;">hello<div id="test">wo rld</div></div>', '<div><b>hello</b><div id="test">world</div></div>');
28 testSingleToggle("bold", '<span style="font-weight: bold;">hello<span id="test"> world</div></div>', '<b>hello</b><span id="test">world</span>'); 28 testSingleToggle("bold", '<span style="font-weight: bold;">hello<span id="test"> world</div></div>', '<b>hello</b><span id="test">world</span>');
29 testSingleToggle("bold", '<span style="font-style: italic; font-weight: bold;">h ello<span id="test">world</div></div>', '<span style="font-style: italic;"><b>he llo</b><span id="test">world</span></span>'); 29 testSingleToggle("bold", '<span style="font-style: italic; font-weight: bold;">h ello<span id="test">world</div></div>', '<span style="font-style: italic;"><b>he llo</b><span id="test">world</span></span>');
30 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'); 30 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');
31 testSingleToggle("italic", '<span style="font-style: italic;"><div>hello</div></ span>', '<div>hello</div>'); 31 testSingleToggle("italic", '<span style="font-style: italic;"><div>hello</div></ span>', '<div>hello</div>');
32 testSingleToggle("italic", '<span style="font-style: italic;"><div id="test">hel lo</div><span style="font-style: oblique;">world</span>', '<div id="test">hello< /div><span style="font-style: oblique;">world</span>'); 32 testSingleToggle("italic", '<span style="font-style: italic;"><div id="test">hel lo</div><span style="font-style: oblique;">world</span>', '<div id="test">hello< /div><span style="font-style: oblique;">world</span>');
33 testSingleToggle("italic", '<span style="font-style: italic; font-weight: bold;" ><div>hello</div></span>', '<span style="font-weight: bold;"><div>hello</div></s pan>'); 33 testSingleToggle("italic", '<span style="font-style: italic; font-weight: bold;" ><div>hello</div></span>', '<span style="font-weight: bold;"><div>hello</div></s pan>');
34 testSingleToggle("italic", '<span style="font-style: italic; text-decoration: li ne-through;"><div>hello</div></span>', '<span style="text-decoration: line-throu gh;"><div>hello</div></span>'); 34 testSingleToggle("italic", '<span style="font-style: italic; text-decoration: li ne-through;"><div>hello</div></span>', '<span style="text-decoration-line: line- through;"><div>hello</div></span>');
35 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>'); 35 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>');
36 testSingleToggle("italic", '<span style="font-style: italic;">hello <span id="te st">world</span> webkit</span>', '<i>hello </i><span id="test">world</span><i> w ebkit</i>'); 36 testSingleToggle("italic", '<span style="font-style: italic;">hello <span id="te st">world</span> webkit</span>', '<i>hello </i><span id="test">world</span><i> w ebkit</i>');
37 testSingleToggle("underline", '<span style="text-decoration: underline;"><div id ="test">hello</div>world</span>', '<div id="test">hello</div><u>world</u>'); 37 testSingleToggle("underline", '<span style="text-decoration: underline;"><div id ="test">hello</div>world</span>', '<div id="test">hello</div><u>world</u>');
38 testSingleToggle("underline", '<span style="text-decoration: underline;"><div id ="test">hello</div><blockquote>world<br>webkit</blockquote></span>', '<div id="t est">hello</div><blockquote style="text-decoration: underline;">world<br>webkit< /blockquote>'); 38 testSingleToggle("underline", '<span style="text-decoration: underline;"><div id ="test">hello</div><blockquote>world<br>webkit</blockquote></span>', '<div id="t est">hello</div><blockquote style="text-decoration-line: underline;">world<br>we bkit</blockquote>');
39 testSingleToggle("underline", '<span style="text-decoration: underline;">hello<d iv id="test">world</div>webkit</u>', '<u>hello</u><div id="test">world</div><u>w ebkit</u>'); 39 testSingleToggle("underline", '<span style="text-decoration: underline;">hello<d iv id="test">world</div>webkit</u>', '<u>hello</u><div id="test">world</div><u>w ebkit</u>');
40 testSingleToggle("underline", 40 testSingleToggle("underline",
41 '<div style="text-decoration: underline;"><div>hello</span></div><div id="te st">webkit</div><span style="font-style: italic;">rocks</span>', 41 '<div style="text-decoration: underline;"><div>hello</span></div><div id="te st">webkit</div><span style="font-style: italic;">rocks</span>',
42 '<div><div style="text-decoration: underline;">hello</span></div><div id="te st">webkit</div><u><span style="font-style: italic;">rocks</span></u></div>'); 42 '<div><div style="text-decoration-line: underline;">hello</span></div><div i d="test">webkit</div><u><span style="font-style: italic;">rocks</span></u></div> ');
43 testSingleToggle("underline", '<span style="text-decoration: underline;"><div st yle="text-decoration: line-through;">hello</div><div id="test">world</div></span >', '<div style="text-decoration: underline line-through;">hello</div><div id="t est">world</div>'); 43 testSingleToggle("underline", '<span style="text-decoration: underline;"><div st yle="text-decoration: 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>');
44 testSingleToggle("strikeThrough", '<span style="text-decoration: line-through;"> <div id="test">hello</div><div style="text-decoration: underline;">world</div></ span>', '<div id="test">hello</div><div style="text-decoration: line-through und erline;">world</div>'); 44 testSingleToggle("strikeThrough", '<span style="text-decoration: line-through;"> <div id="test">hello</div><div style="text-decoration: underline;">world</div></ span>', '<div id="test">hello</div><div style="text-decoration-line: line-throug h underline;">world</div>');
45 45
46 document.body.removeChild(testContainer); 46 document.body.removeChild(testContainer);
47 47
48 var successfullyParsed = true; 48 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698