From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../tests/selection/Document-open.html | 44 + testing/web-platform/tests/selection/OWNERS | 1 + testing/web-platform/tests/selection/addRange.html | 178 ++++ testing/web-platform/tests/selection/collapse.html | 88 ++ .../tests/selection/collapseToStartEnd.html | 121 +++ testing/web-platform/tests/selection/common.js | 952 +++++++++++++++++++++ .../tests/selection/deleteFromDocument.html | 97 +++ .../web-platform/tests/selection/dir-manual.html | 106 +++ testing/web-platform/tests/selection/extend.html | 149 ++++ .../web-platform/tests/selection/getRangeAt.html | 14 + .../web-platform/tests/selection/getSelection.html | 160 ++++ .../web-platform/tests/selection/interfaces.html | 41 + .../web-platform/tests/selection/isCollapsed.html | 31 + .../tests/selection/removeAllRanges.html | 45 + .../tests/selection/selectAllChildren.html | 53 ++ .../web-platform/tests/selection/test-iframe.html | 33 + 16 files changed, 2113 insertions(+) create mode 100644 testing/web-platform/tests/selection/Document-open.html create mode 100644 testing/web-platform/tests/selection/OWNERS create mode 100644 testing/web-platform/tests/selection/addRange.html create mode 100644 testing/web-platform/tests/selection/collapse.html create mode 100644 testing/web-platform/tests/selection/collapseToStartEnd.html create mode 100644 testing/web-platform/tests/selection/common.js create mode 100644 testing/web-platform/tests/selection/deleteFromDocument.html create mode 100644 testing/web-platform/tests/selection/dir-manual.html create mode 100644 testing/web-platform/tests/selection/extend.html create mode 100644 testing/web-platform/tests/selection/getRangeAt.html create mode 100644 testing/web-platform/tests/selection/getSelection.html create mode 100644 testing/web-platform/tests/selection/interfaces.html create mode 100644 testing/web-platform/tests/selection/isCollapsed.html create mode 100644 testing/web-platform/tests/selection/removeAllRanges.html create mode 100644 testing/web-platform/tests/selection/selectAllChildren.html create mode 100644 testing/web-platform/tests/selection/test-iframe.html (limited to 'testing/web-platform/tests/selection') diff --git a/testing/web-platform/tests/selection/Document-open.html b/testing/web-platform/tests/selection/Document-open.html new file mode 100644 index 000000000..9d170914e --- /dev/null +++ b/testing/web-platform/tests/selection/Document-open.html @@ -0,0 +1,44 @@ + +Selection Document.open() tests +
+ + + diff --git a/testing/web-platform/tests/selection/OWNERS b/testing/web-platform/tests/selection/OWNERS new file mode 100644 index 000000000..ce908c45b --- /dev/null +++ b/testing/web-platform/tests/selection/OWNERS @@ -0,0 +1 @@ +@ayg diff --git a/testing/web-platform/tests/selection/addRange.html b/testing/web-platform/tests/selection/addRange.html new file mode 100644 index 000000000..5fe840942 --- /dev/null +++ b/testing/web-platform/tests/selection/addRange.html @@ -0,0 +1,178 @@ + +Selection.addRange() tests +
+ + + + + diff --git a/testing/web-platform/tests/selection/collapse.html b/testing/web-platform/tests/selection/collapse.html new file mode 100644 index 000000000..530158a05 --- /dev/null +++ b/testing/web-platform/tests/selection/collapse.html @@ -0,0 +1,88 @@ + +Selection.collapse() tests + +
+ + + + diff --git a/testing/web-platform/tests/selection/collapseToStartEnd.html b/testing/web-platform/tests/selection/collapseToStartEnd.html new file mode 100644 index 000000000..37c57fa78 --- /dev/null +++ b/testing/web-platform/tests/selection/collapseToStartEnd.html @@ -0,0 +1,121 @@ + +Selection.collapseTo(Start|End)() tests +
+ + + + diff --git a/testing/web-platform/tests/selection/common.js b/testing/web-platform/tests/selection/common.js new file mode 100644 index 000000000..c0b622f63 --- /dev/null +++ b/testing/web-platform/tests/selection/common.js @@ -0,0 +1,952 @@ +"use strict"; +// TODO: iframes, contenteditable/designMode + +// Everything is done in functions in this test harness, so we have to declare +// all the variables before use to make sure they can be reused. +var selection; +var testDiv, paras, detachedDiv, detachedPara1, detachedPara2, + foreignDoc, foreignPara1, foreignPara2, xmlDoc, xmlElement, + detachedXmlElement, detachedTextNode, foreignTextNode, + detachedForeignTextNode, xmlTextNode, detachedXmlTextNode, + processingInstruction, detachedProcessingInstruction, comment, + detachedComment, foreignComment, detachedForeignComment, xmlComment, + detachedXmlComment, docfrag, foreignDocfrag, xmlDocfrag, doctype, + foreignDoctype, xmlDoctype; +var testRanges, testPoints, testNodes; + +function setupRangeTests() { + selection = getSelection(); + testDiv = document.querySelector("#test"); + if (testDiv) { + testDiv.parentNode.removeChild(testDiv); + } + testDiv = document.createElement("div"); + testDiv.id = "test"; + document.body.insertBefore(testDiv, document.body.firstChild); + // Test some diacritics, to make sure browsers are using code units here + // and not something like grapheme clusters. + testDiv.innerHTML = "

Äb̈c̈d̈ëf̈g̈ḧ\n" + + "

Qrstuvwx" + + "

To debug test failures, add a query parameter with the test id (like +"?5"). Only that test will be run. Then you can look at the resulting +iframes in the DOM. +

+ + + + diff --git a/testing/web-platform/tests/selection/dir-manual.html b/testing/web-platform/tests/selection/dir-manual.html new file mode 100644 index 000000000..39cf65552 --- /dev/null +++ b/testing/web-platform/tests/selection/dir-manual.html @@ -0,0 +1,106 @@ + +Selection direction tests + +
+

This is a manual test, since there's no way to synthesize keyboard or + mouse input. Click after the letter "c" in the following paragraph and + drag backwards so that both the "b" and the "c" are highlighted, then click + the "Test" button: + +

abcd + +

efghi +

+
+ + + diff --git a/testing/web-platform/tests/selection/extend.html b/testing/web-platform/tests/selection/extend.html new file mode 100644 index 000000000..e00f8c401 --- /dev/null +++ b/testing/web-platform/tests/selection/extend.html @@ -0,0 +1,149 @@ + +Selection extend() tests + + + + + + +
+ diff --git a/testing/web-platform/tests/selection/getRangeAt.html b/testing/web-platform/tests/selection/getRangeAt.html new file mode 100644 index 000000000..3c6d7976f --- /dev/null +++ b/testing/web-platform/tests/selection/getRangeAt.html @@ -0,0 +1,14 @@ + +The getRangeAt method +
+ + + diff --git a/testing/web-platform/tests/selection/getSelection.html b/testing/web-platform/tests/selection/getSelection.html new file mode 100644 index 000000000..ea119f2fc --- /dev/null +++ b/testing/web-platform/tests/selection/getSelection.html @@ -0,0 +1,160 @@ + +getSelection() tests +
+ + + diff --git a/testing/web-platform/tests/selection/interfaces.html b/testing/web-platform/tests/selection/interfaces.html new file mode 100644 index 000000000..7174686a4 --- /dev/null +++ b/testing/web-platform/tests/selection/interfaces.html @@ -0,0 +1,41 @@ + +Selection interface tests +
+ + + + + + diff --git a/testing/web-platform/tests/selection/isCollapsed.html b/testing/web-platform/tests/selection/isCollapsed.html new file mode 100644 index 000000000..113a16db8 --- /dev/null +++ b/testing/web-platform/tests/selection/isCollapsed.html @@ -0,0 +1,31 @@ + +Selection.isCollapsed tests +
+ + + + diff --git a/testing/web-platform/tests/selection/removeAllRanges.html b/testing/web-platform/tests/selection/removeAllRanges.html new file mode 100644 index 000000000..cc6b69256 --- /dev/null +++ b/testing/web-platform/tests/selection/removeAllRanges.html @@ -0,0 +1,45 @@ + +Selection.removeAllRanges() tests +
+ + + + diff --git a/testing/web-platform/tests/selection/selectAllChildren.html b/testing/web-platform/tests/selection/selectAllChildren.html new file mode 100644 index 000000000..904e0cb2b --- /dev/null +++ b/testing/web-platform/tests/selection/selectAllChildren.html @@ -0,0 +1,53 @@ + +Selection.selectAllChildren tests +
+ + + + diff --git a/testing/web-platform/tests/selection/test-iframe.html b/testing/web-platform/tests/selection/test-iframe.html new file mode 100644 index 000000000..42b982324 --- /dev/null +++ b/testing/web-platform/tests/selection/test-iframe.html @@ -0,0 +1,33 @@ + +Selection test iframe + + + + -- cgit v1.2.3