diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/innerText/getter.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/innerText/getter.html')
-rw-r--r-- | testing/web-platform/tests/innerText/getter.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/web-platform/tests/innerText/getter.html b/testing/web-platform/tests/innerText/getter.html new file mode 100644 index 000000000..67f21ef98 --- /dev/null +++ b/testing/web-platform/tests/innerText/getter.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<title>innerText getter test</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +.before::before { content:'abc'; } +.table { display:table; } +.itable { display:inline-table; } +.row { display:table-row; } +.cell { display:table-cell; } +.first-line-uppercase::first-line { text-transform:uppercase; } +.first-letter-uppercase::first-letter { text-transform:uppercase; } +.first-letter-float::first-letter { float:left; } +</style> +<div id="container"></div> +<svg id="svgContainer"></svg> +<script> +function testText(html, expectedPlain, msg) { + textTextInContainer(container, html, expectedPlain, msg); +} +function testTextInSVG(html, expectedPlain, msg) { + textTextInContainer(svgContainer, html, expectedPlain, msg); +} +function textTextInContainer(cont, html, expectedPlain, msg) { + test(function() { + container.innerHTML = html; + if (cont != container) { + while (container.firstChild) { + cont.appendChild(container.firstChild); + } + } + var e = document.getElementById('target'); + if (!e) { + e = cont.firstChild; + } + var pokes = document.getElementsByClassName('poke'); + for (var i = 0; i < pokes.length; ++i) { + pokes[i].textContent = 'abc'; + } + pokes = document.getElementsByClassName('poke-rp'); + for (var i = 0; i < pokes.length; ++i) { + var rp = document.createElement("rp"); + rp.textContent = "abc"; + pokes[i].appendChild(rp); + } + var shadows = document.getElementsByClassName('shadow'); + for (var i = 0; i < shadows.length; ++i) { + var s = shadows[i].createShadowRoot(); + s.textContent = 'abc'; + } + while (e && e.nodeType != Node.ELEMENT_NODE) { + e = e.nextSibling; + } + assert_equals(e.innerText, expectedPlain); + cont.textContent = ''; + }, msg + ' (' + format_value(html) + ')'); +} +</script> +<script src="getter-tests.js"></script> |