dom/imptests/editing/selecttest/test_interfaces.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!doctype html>
     2 <title>Selection interface tests</title>
     3 <div id=log></div>
     4 <script src=/resources/testharness.js></script>
     5 <script src=/resources/testharnessreport.js></script>
     6 <script src=/resources/WebIDLParser.js></script>
     7 <script src=/resources/idlharness.js></script>
     8 <script type=text/plain>
     9 interface Selection {
    10   readonly attribute Node? anchorNode;
    11   readonly attribute unsigned long anchorOffset;
    12   readonly attribute Node? focusNode;
    13   readonly attribute unsigned long focusOffset;
    15   readonly attribute boolean isCollapsed;
    16   void               collapse(Node node, unsigned long offset);
    17   void               collapseToStart();
    18   void               collapseToEnd();
    20   void               extend(Node node, unsigned long offset);
    22   void               selectAllChildren(Node node);
    23   void               deleteFromDocument();
    25   readonly attribute unsigned long rangeCount;
    26   Range              getRangeAt(unsigned long index);
    27   void               addRange(Range range);
    28   void               removeRange(Range range);
    29   void               removeAllRanges();
    31   stringifier;
    32 };
    33 </script>
    34 <script>
    35 "use strict";
    37 var idlArray = new IdlArray();
    38 idlArray.add_idls(document.querySelector("script[type=text\\/plain]").textContent);
    39 idlArray.add_objects({Selection: ['getSelection()']});
    40 idlArray.test();
    41 </script>

mercurial