зеркало из https://github.com/mozilla/gecko-dev.git
Test for bug 503531.
This commit is contained in:
Родитель
fc0c58517d
Коммит
13062b7903
|
@ -0,0 +1,23 @@
|
|||
<html class="reftest-wait"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Testcase #1 for bug 503531</title>
|
||||
<script>
|
||||
function boom() {
|
||||
var caret = document.getElementById('caret');
|
||||
|
||||
var sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
var range = document.createRange();
|
||||
range.selectNode(caret);
|
||||
sel.addRange(range);
|
||||
sel.collapseToStart();
|
||||
|
||||
setTimeout(function(){document.documentElement.className = '';}, 50)
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body contenteditable="true" onload="document.body.focus(); boom()">
|
||||
<div>BLOCK</div>
|
||||
<div id="caret"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<html class="reftest-wait"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Testcase #1 for bug 503531</title>
|
||||
<script>
|
||||
function boom() {
|
||||
var emptyText = document.createTextNode('x');
|
||||
document.body.appendChild(emptyText);
|
||||
|
||||
var sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
var range = document.createRange();
|
||||
range.selectNode(emptyText);
|
||||
sel.addRange(range);
|
||||
sel.collapseToStart();
|
||||
|
||||
emptyText.nodeValue='';
|
||||
|
||||
setTimeout(function(){document.documentElement.className = '';}, 50)
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body contenteditable="true" onload="document.body.focus(); boom()">
|
||||
<div>BLOCK</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1324,6 +1324,7 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
|
|||
== 503364-1a.html 503364-1-ref.html
|
||||
== 503364-1b.html 503364-1-ref.html
|
||||
== 503399.html 503399-ref.html
|
||||
== 503531-1.html 503531-1-ref.html
|
||||
== 504032-1.html 504032-1-ref.html
|
||||
== 505743-1.html about:blank
|
||||
== 506481-1.html 506481-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче