blob: b390073373b61838f2c5edb31ae5d0fa0ddf1bbc [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This is a test of styleWithCSS.</p>
<div id="test" contenteditable>
hello
</div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var test = document.getElementById('test');
document.execCommand('styleWithCSS', false, true);
window.getSelection().selectAllChildren(test);
document.execCommand('bold', false, null);
var firstInnerHTML = test.innerHTML;
document.execCommand('undo', false, null);
document.execCommand('styleWithCSS', false, true);
document.execCommand('bold', false, null);
var result = 'PASS';
if (firstInnerHTML != test.innerHTML)
result = 'FAIL: ' + firstInnerHTML + ' does not match ' + test.innerHTML;
document.body.appendChild(document.createTextNode(result));
</script>
</body>
</html>