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 /layout/base/tests/test_getClientRects_emptytext.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 'layout/base/tests/test_getClientRects_emptytext.html')
-rw-r--r-- | layout/base/tests/test_getClientRects_emptytext.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/layout/base/tests/test_getClientRects_emptytext.html b/layout/base/tests/test_getClientRects_emptytext.html new file mode 100644 index 000000000..c009a190e --- /dev/null +++ b/layout/base/tests/test_getClientRects_emptytext.html @@ -0,0 +1,26 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<p id="display"></p> +<div id="content" style="display: none"> +</div> +<div id="testDiv"> </div> +<script> +var textNode = testDiv.firstChild; +var range = new Range(); +range.selectNodeContents(textNode); +is(range.getClientRects().length, 1, "Text node should have a rectangle"); +var rect = range.getClientRects()[0]; +ok(rect.left > 0, "Rectangle x should be greater than zero"); +ok(rect.top > 0, "Rectangle y should be greater than zero"); +is(rect.width, 0, "Rectangle should be zero width"); +is(rect.height, 0, "Rectangle should be zero height"); +</script> +</body> +</html> |