blob: a24c01647bad39923384c65f7350f53117105872 [file] [log] [blame]
yosin931bf3c2016-09-06 04:24:351<!doctype html>
2<script src="../../resources/testharness.js"></script>
3<script src="../../resources/testharnessreport.js"></script>
4<script src="../../editing/assert_selection.js"></script>
harrison92da4a0b2006-07-09 23:18:395<script>
yosin931bf3c2016-09-06 04:24:356// Deleting the contents of a DOMRange and then inserting a node into it crashes
7// in WebCore::Font::canUseGlyphCache
8test(() => assert_selection(
9 '<div id="mydiv">^01234|</div>',
10 selection => {
11 const range = selection.getRangeAt(0);
12 range.deleteContents();
13 range.insertNode(selection.document.createElement('div'));
14 },
yosind892f952017-02-14 15:56:0015 '<div id="mydiv">^<div></div>|</div>'),
yosin931bf3c2016-09-06 04:24:3516 'Range#deleteContents() then Range#insertNode() should not crash');
harrison92da4a0b2006-07-09 23:18:3917</script>