зеркало из https://github.com/mozilla/pjs.git
Add crashtests for bug 499006.
This commit is contained in:
Родитель
6d15576172
Коммит
5fa1fbc646
|
@ -0,0 +1,26 @@
|
|||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
|
||||
function select(start, startOffset, end, endOffset) {
|
||||
var sel = getSelection();
|
||||
sel.removeAllRanges();
|
||||
var range = document.createRange();
|
||||
range.setStart(start, startOffset);
|
||||
range.setEnd(end, endOffset);
|
||||
sel.addRange(range);
|
||||
}
|
||||
|
||||
function boom() {
|
||||
var p = document.body;
|
||||
select(p.childNodes[0],0,p.childNodes[0],1);
|
||||
sel = getSelection();
|
||||
range = sel.getRangeAt(0);
|
||||
range.detach();
|
||||
range.insertNode(p);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom()"><span>Hello Kitty</span></body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function extractc(j) {
|
||||
var sel = window.getSelection();
|
||||
|
||||
|
||||
var b=document.getElementById('b');
|
||||
|
||||
var range =document.createRange();
|
||||
range.setStart(document.documentElement, 0);
|
||||
range.setEnd(document.documentElement, 0);
|
||||
sel.addRange(range);
|
||||
range.extractContents();
|
||||
|
||||
range.setStart(b, 0);
|
||||
range.setEnd(b, 0);
|
||||
sel.addRange(range);
|
||||
range.extractContents();
|
||||
|
||||
|
||||
range.setStart(b, 0);
|
||||
range.setEnd(b, 0);
|
||||
sel.addRange(range);
|
||||
range.extractContents();
|
||||
|
||||
|
||||
}
|
||||
setTimeout(extractc,200,0);
|
||||
</script>
|
||||
<title id="b"></title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
|
@ -18,5 +18,7 @@ load 417852-1.html
|
|||
load 462947.html
|
||||
load 439206-1.html
|
||||
load 473284.xul
|
||||
load 499006-1.html
|
||||
load 499006-2.html
|
||||
load 502617.html
|
||||
asserts(1) load 504224.html # bug 564098
|
||||
|
|
Загрузка…
Ссылка в новой задаче