mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 371839. Some simple selection rendering tests. r=bzbarsky
--HG-- extra : rebase_source : b90d4b4eb7d17cc32ab2b9cacc7b54c6a72b209f
This commit is contained in:
parent
4ef62fb0ed
commit
9b800f0c9f
@ -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
|
||||
|
||||
|
14
layout/reftests/selection/dynamic-text-1-ref.html
Normal file
14
layout/reftests/selection/dynamic-text-1-ref.html
Normal 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>
|
21
layout/reftests/selection/dynamic-text-1a.html
Normal file
21
layout/reftests/selection/dynamic-text-1a.html
Normal 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>
|
19
layout/reftests/selection/dynamic-text-1b.html
Normal file
19
layout/reftests/selection/dynamic-text-1b.html
Normal 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>
|
2
layout/reftests/selection/reftest.list
Normal file
2
layout/reftests/selection/reftest.list
Normal file
@ -0,0 +1,2 @@
|
||||
== dynamic-text-1a.html dynamic-text-1-ref.html
|
||||
== dynamic-text-1b.html dynamic-text-1-ref.html
|
Loading…
Reference in New Issue
Block a user