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

Side by Side Diff: LayoutTests/editing/execCommand/script-tests/toggle-style-2.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 remove span tags with no attributes if we remo ved the last attribute.") 1 description("Test to make sure we remove span tags with no attributes if we remo ved the last attribute.")
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 window.getSelection().selectAllChildren(testContainer); 10 window.getSelection().selectAllChildren(testContainer);
(...skipping 21 matching lines...) Expand all
32 testSingleToggle("underline", "test", "<u>test</u>"); 32 testSingleToggle("underline", "test", "<u>test</u>");
33 testSingleToggle("underline", "<u><b><strike>test</strike></b></u>", "<b><strike >test</strike></b>"); 33 testSingleToggle("underline", "<u><b><strike>test</strike></b></u>", "<b><strike >test</strike></b>");
34 testDoubleToggle("underline", "test", "test"); 34 testDoubleToggle("underline", "test", "test");
35 testSingleToggle("strikethrough", "test", "<strike>test</strike>"); 35 testSingleToggle("strikethrough", "test", "<strike>test</strike>");
36 testSingleToggle("strikethrough", "<u><b><strike>test</strike></b></u>", "<u><b> test</b></u>"); 36 testSingleToggle("strikethrough", "<u><b><strike>test</strike></b></u>", "<u><b> test</b></u>");
37 testDoubleToggle("strikethrough", "test", "test"); 37 testDoubleToggle("strikethrough", "test", "test");
38 38
39 testSingleToggle("strikethrough", "<u>test</u>", "<u><strike>test</strike></u>") ; 39 testSingleToggle("strikethrough", "<u>test</u>", "<u><strike>test</strike></u>") ;
40 testSingleToggle("underline", "<strike>test</strike>", "<u><strike>test</strike> </u>"); 40 testSingleToggle("underline", "<strike>test</strike>", "<u><strike>test</strike> </u>");
41 41
42 testSingleToggle("strikethrough", '<span style="text-decoration: overline;">test </span>', '<span style="text-decoration: overline;"><strike>test</strike></span> '); 42 testSingleToggle("strikethrough", '<span style="text-decoration: overline;">test </span>', '<span style="text-decoration-line: overline;"><strike>test</strike></ span>');
43 testSingleToggle("underline", '<span style="text-decoration: overline;">test</sp an>', '<span style="text-decoration: overline;"><u>test</u></span>'); 43 testSingleToggle("underline", '<span style="text-decoration: overline;">test</sp an>', '<span style="text-decoration-line: overline;"><u>test</u></span>');
44 44
45 document.body.removeChild(testContainer); 45 document.body.removeChild(testContainer);
46 46
47 var successfullyParsed = true; 47 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698