dom/imptests/editing/selecttest/test_interfaces.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/imptests/editing/selecttest/test_interfaces.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<!doctype html>
     1.5 +<title>Selection interface tests</title>
     1.6 +<div id=log></div>
     1.7 +<script src=/resources/testharness.js></script>
     1.8 +<script src=/resources/testharnessreport.js></script>
     1.9 +<script src=/resources/WebIDLParser.js></script>
    1.10 +<script src=/resources/idlharness.js></script>
    1.11 +<script type=text/plain>
    1.12 +interface Selection {
    1.13 +  readonly attribute Node? anchorNode;
    1.14 +  readonly attribute unsigned long anchorOffset;
    1.15 +  readonly attribute Node? focusNode;
    1.16 +  readonly attribute unsigned long focusOffset;
    1.17 +
    1.18 +  readonly attribute boolean isCollapsed;
    1.19 +  void               collapse(Node node, unsigned long offset);
    1.20 +  void               collapseToStart();
    1.21 +  void               collapseToEnd();
    1.22 +
    1.23 +  void               extend(Node node, unsigned long offset);
    1.24 +
    1.25 +  void               selectAllChildren(Node node);
    1.26 +  void               deleteFromDocument();
    1.27 +
    1.28 +  readonly attribute unsigned long rangeCount;
    1.29 +  Range              getRangeAt(unsigned long index);
    1.30 +  void               addRange(Range range);
    1.31 +  void               removeRange(Range range);
    1.32 +  void               removeAllRanges();
    1.33 +
    1.34 +  stringifier;
    1.35 +};
    1.36 +</script>
    1.37 +<script>
    1.38 +"use strict";
    1.39 +
    1.40 +var idlArray = new IdlArray();
    1.41 +idlArray.add_idls(document.querySelector("script[type=text\\/plain]").textContent);
    1.42 +idlArray.add_objects({Selection: ['getSelection()']});
    1.43 +idlArray.test();
    1.44 +</script>

mercurial