Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/ranges/Range-constructor.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Range constructor test</title>
<link rel="author" title="Aryeh Gregor" href=ayg@aryeh.name>
<div id=log></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
"use strict";
test(function() {
var range = new Range();
assert_equals(range.startContainer, document, "startContainer");
assert_equals(range.endContainer, document, "endContainer");
assert_equals(range.startOffset, 0, "startOffset");
assert_equals(range.endOffset, 0, "endOffset");
assert_true(range.collapsed, "collapsed");
assert_equals(range.commonAncestorContainer, document,
"commonAncestorContainer");
});
</script>