<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
[
'<div contenteditable>',
'<canvas contenteditable="false">text</canvas>',
'<b></b>^<textarea></textarea>|',
'</div>',
],
'justifyCenter',
[
'<div contenteditable>',
'<canvas contenteditable="false">text</canvas>',
'<b><div style="text-align: center;">',
'^<textarea></textarea>|',
'</div></b>',
'</div>',
]),
'JustifyCenter should not crash with mixed editability');
</script>