summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectAllChildren.htm
blob: 8f0d7c81b99bf786dd554a37e37343211e80fad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE HTML>
<html>
    <head>
        <title id="desc">HTML5 Selection: Call selectAllChildren() where the parameter is a text node</title>
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
        <script src="common.js"></script>
        <script type="text/javascript">
            function RunTest()
            {
                var selection = window.getSelection();
                var div1 = document.getElementById("div1");

                checkDefaultSelectionAttributes();
                assert_equals(selection.toString(), "");

                selection.selectAllChildren(div1.firstChild);

                checkSelectionAttributes(div1.firstChild, 0, div1.firstChild, 0, true, 1);
                assert_equals(selection.toString(), "");
            }
        </script>
    </head>
    <body onload="test(RunTest);">
        <div id="div1">Call selectAllChildren() where the parameter is a text node</div>
    </body>
</html>