dom/imptests/editing/selecttest/test_interfaces.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial