blob: dcc05e604d6d5715d9013f357044a6260869e6ca [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ ColorFilterEnabled=true ] -->
<div id="target" style="color: #ccc; background: #369; -apple-color-filter: apple-invert-lightness();" contenteditable>This text is light gray</div>
<p>
Test that an NSAttributedString for copy doesn't convert colors through -apple-color-filter.
</p>
<script src="resources/dump-attributed-string.js"></script>
<script>
var shouldAutoDump = false;
</script>
<pre id="console"></pre>
<script>
function log(message)
{
document.getElementById("console").append(message + "\n");
}
if (window.testRunner) {
testRunner.dumpAsText();
var target = document.getElementById("target");
target.focus();
var attributedString = textInputController.legacyAttributedString(target.firstChild, 2, target.firstChild, 4);
var serializedString = serializeAttributedString(attributedString);
log(serializedString);
target.parentNode.removeChild(target);
} else
log("This test can only run in DumpRenderTree.");
</script>