summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/ranges/Range-constructor.html
blob: e8cfbef753d9bd057e290d611a273f0d4cbd4fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!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>