Bug 371839. Some simple selection rendering tests. r=bzbarsky

--HG--
extra : rebase_source : b90d4b4eb7d17cc32ab2b9cacc7b54c6a72b209f
This commit is contained in:
Robert O'Callahan 2009-07-27 10:07:22 +12:00
parent 4ef62fb0ed
commit 9b800f0c9f
5 changed files with 59 additions and 0 deletions

View File

@ -123,6 +123,9 @@ include ../../modules/plugin/test/reftest/reftest.list
include printing/reftest.list
include pagination/reftest.list
# selection
include selection/reftest.list
# svg/
include svg/reftest.list

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<body style="white-space:pre">ABCD
EFGH
IJKL
<script>
var t = document.body.firstChild;
var sel = window.getSelection();
sel.collapse(t, 6);
sel.extend(t, 8);
</script>
</body>
</html>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<body style="white-space:pre">0000
ABCD
EFGH
IJKL
<script>
var t = document.body.firstChild;
var sel = window.getSelection();
sel.collapse(t, 11);
sel.extend(t, 13);
function doTest() {
t.replaceData(0, 5, '');
document.documentElement.removeAttribute('class');
}
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<body style="white-space:pre">EFGH
IJKL
<script>
var t = document.body.firstChild;
var sel = window.getSelection();
sel.collapse(t, 1);
sel.extend(t, 3);
function doTest() {
t.insertData(0, 'ABCD\n');
document.documentElement.removeAttribute('class');
}
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</body>
</html>

View File

@ -0,0 +1,2 @@
== dynamic-text-1a.html dynamic-text-1-ref.html
== dynamic-text-1b.html dynamic-text-1-ref.html