Implement Range#deleteContents

This commit is contained in:
David Zbarsky 2015-07-13 03:05:33 -04:00
parent ea690a2dff
commit 25b7c9523c
6 changed files with 116 additions and 299 deletions

View file

@ -5349,6 +5349,12 @@
"url": "/_mozilla/mozilla/proxy_setter.html"
}
],
"mozilla/range_deleteContents.html": [
{
"path": "mozilla/range_deleteContents.html",
"url": "/_mozilla/mozilla/range_deleteContents.html"
}
],
"mozilla/response-data-brotli.htm": [
{
"path": "mozilla/response-data-brotli.htm",

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
test(function() {
var range = document.createRange();
range.setStart(document, 0);
range.setEnd(document, 1);
range.deleteContents();
assert_equals(document.childNodes.length, 1);
}, "Deleting range containing doctype");
</script>
</body>
</html>