<!doctype HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div contenteditable="true">
<img src="../resources/abe.png">
</div>
<script>
test(function() {
document.getSelection().removeAllRanges();
var range = document.createRange();
range.selectNode(document.querySelector('img'));
document.getSelection().addRange(range);
assert_equals(document.queryCommandState('bold'), false);
assert_equals(document.queryCommandState('italic'), false);
assert_equals(document.queryCommandState('underline'), false);
assert_equals(document.queryCommandState('strikethrough'), false);
}, 'run queryCommandState() on the selected img element');
</script>