summaryrefslogtreecommitdiffstats
path: root/dom/base/test/test_bug448993.html
blob: 96364ea5b5523ba612233384bd06c9121023ed86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=448993
-->
<head>
  <title>Test for Bug 448993</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448993">Mozilla Bug 448993</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 448993 **/

function runTest() {
  var a = document.getElementById("a");
  var b = document.getElementById("b");
  var c = document.getElementById("c")
  var r = document.createRange();
  r.setStart(b, 0); 
  r.setEnd(a, 2); 
  c.appendChild(b);
  r.extractContents();
  var s = document.createRange();
  s.setEnd(b, 0); 
  SpecialPowers.gc();
  s.deleteContents();
  ok(true, "test did not crash");
  SimpleTest.finish();
}

SimpleTest.waitForExplicitFinish();
addLoadEvent(runTest);

</script>
</pre>
<div id="a"><span id="b"></span><span id="c"></span></div>
</body>
</html>