OLD | NEW |
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 Loading... |
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; |
OLD | NEW |