| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This tests querying BackColor and FontSize of the typing style. WebKit should not modify the typing style and should return the correct values.</p> |
| <div id="test" contenteditable></div> |
| <pre><script> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var test = document.getElementById('test'); |
| test.focus(); |
| window.getSelection().setPosition(test, 1); |
| document.execCommand('backColor', false, '#ff0000'); |
| document.execCommand('fontSize', false, 5); |
| var backColor = document.queryCommandValue('backColor'); |
| var fontSize = document.queryCommandValue('fontSize'); |
| document.writeln(backColor == 'rgb(255, 0, 0)' ? 'PASS: background color' : "FAIL: background color; expected rgb(255, 0, 0) but got " + backColor); |
| document.writeln(fontSize == 5 ? 'PASS: font size' : "FAIL: font size; expected 5 but got " + fontSize); |
| |
| </script></pre> |
| </body> |
| </html> |