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

Side by Side Diff: LayoutTests/editing/style/script-tests/inline-style-container.js

Issue 23111004: Re-land "[css3-text] Implement text-decoration property shorthand" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased after Alexis' function name changes in CSSComputedStyleDeclaration.cpp 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 WebKit adds style to the appropriate container.') ; 1 description('Test to make sure WebKit adds style to the appropriate container.') ;
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 var styleWithCSS = false; 7 var styleWithCSS = false;
8 function testSingleToggle(toggleCommand, value, initialContents, expectedContent s) 8 function testSingleToggle(toggleCommand, value, initialContents, expectedContent s)
9 { 9 {
10 testContainer.innerHTML = initialContents; 10 testContainer.innerHTML = initialContents;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 debug('') 44 debug('')
45 debug('styleWithCSS = true') 45 debug('styleWithCSS = true')
46 styleWithCSS = true; 46 styleWithCSS = true;
47 testSingleToggle("fontSize", 4, '<font face="Arial">hello</font>', '<font face=" Arial" style="font-size: large;">hello</font>'); 47 testSingleToggle("fontSize", 4, '<font face="Arial">hello</font>', '<font face=" Arial" style="font-size: large;">hello</font>');
48 testSingleToggle("fontSize", 4, '<font face="Arial"><b>hello</b></font>', '<font face="Arial"><b style="font-size: large;">hello</b></font>'); 48 testSingleToggle("fontSize", 4, '<font face="Arial"><b>hello</b></font>', '<font face="Arial"><b style="font-size: large;">hello</b></font>');
49 testSingleToggle("fontSize", 4, '<i><b>hello</b></i>', '<i><b style="font-size: large;">hello</b></i>'); 49 testSingleToggle("fontSize", 4, '<i><b>hello</b></i>', '<i><b style="font-size: large;">hello</b></i>');
50 testSingleToggle("fontSize", 4, '<i><b>hello</b> world</i>', '<i style="font-siz e: large;"><b>hello</b> world</i>'); 50 testSingleToggle("fontSize", 4, '<i><b>hello</b> world</i>', '<i style="font-siz e: large;"><b>hello</b> world</i>');
51 testSingleToggle("fontSize", 4, '<font color="blue"><b>hello</b></font>', '<font color="blue"><b style="font-size: large;">hello</b></font>'); 51 testSingleToggle("fontSize", 4, '<font color="blue"><b>hello</b></font>', '<font color="blue"><b style="font-size: large;">hello</b></font>');
52 testSingleToggle("bold", null, '<span style="font-style: italic;">hello</span>', '<span style="font-style: italic; font-weight: bold;">hello</span>'); 52 testSingleToggle("bold", null, '<span style="font-style: italic;">hello</span>', '<span style="font-style: italic; font-weight: bold;">hello</span>');
53 testSingleToggle("underline", null, '<span style="font-style: italic;"><b>hello< /b></span>', '<span style="font-style: italic; text-decoration: underline;"><b>h ello</b></span>'); 53 testSingleToggle("underline", null, '<span style="font-style: italic;"><b>hello< /b></span>', '<span style="font-style: italic; text-decoration-line: underline;" ><b>hello</b></span>');
54 testSingleToggle("underline", null, 54 testSingleToggle("underline", null,
55 '<span style="color: blue;"><i><span style="font-size: large;"><b>hello</b> world</span></i></span>', 55 '<span style="color: blue;"><i><span style="font-size: large;"><b>hello</b> world</span></i></span>',
56 '<span style="color: blue;"><i><span style="font-size: large; text-decoratio n: underline;"><b>hello</b> world</span></i></span>'); 56 '<span style="color: blue;"><i><span style="font-size: large; text-decoratio n-line: underline;"><b>hello</b> world</span></i></span>');
57 57
58 document.body.removeChild(testContainer); 58 document.body.removeChild(testContainer);
59 var successfullyParsed = true; 59 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698