<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// This tests for a crash when changing the alignment of content that starts
// with an image not inside its own block container.
selection_test(
'<div contenteditable>^<img><div>abc</div>|</div>',
'JustifyRight',
[
'<div contenteditable>',
'<div style="text-align: right;">^<img></div>',
'<div style="text-align: right;">abc|</div>',
'</div>',
]);
</script>