author Nicholas Nethercote <>
Mon, 05 Oct 2015 16:59:32 -0700
changeset 301715 3897da20e42dec0bcf73987af1eaac4f8ce950b8
parent 238779 2db29c0ae60b6eb0e196165631127d195fe2ef0b
child 531525 ba6f655fd68963530c866d0d4a48c3db3d307777
permissions -rw-r--r--
Bug 1211324 (part 3) - Remove GraphicsFilter::FILTER_FAST and replace it with FILTER_BEST. r=mattwoodrow. This may sound like an odd change but it's what the current code effectively already does due to the way ToFilter() and ThebesFilter() are defined.

<html xmlns="">
  <title>Test for Bug 686449</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<a target="_blank" href="">Mozilla Bug 686449</a>
<p id="display"></p>
<div id="content" style="display: none">
<div id="rangetest">abcd<div id="picontainer1"><?pi efgh?></div><div>ijkl</div><div id="picontainer2"><?pi mnop?></div>qrst</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 686449 **/

var pi = document.createProcessingInstruction("t", "data");
ok("target" in pi, "No target?");
ok("data" in pi, "No data?");
ok("length" in pi, "No length?");
ok("substringData" in pi, "No substringData?");
ok("appendData" in pi, "No appendData?");
ok("insertData" in pi, "No insertData?");
ok("deleteData" in pi, "No deleteData?");
ok("replaceData" in pi, "No replaceData?");

is(pi.substringData(0, pi.length),, "wrong data?");
var olddata =;
var appenddata = "foo"
is(, olddata + appenddata, "appendData doesn't work?");
pi.deleteData(olddata.length, appenddata.length);
is(, olddata, "deleteData doesn't work?");
pi.replaceData(0, 0, olddata);
is(, olddata + olddata, "replaceData doesn't work?");
pi.insertData(0, olddata);
is(, olddata + olddata + olddata, "insertData doesn't work?"); = olddata;
is(, olddata, "setting data doesn't work?");

var r = document.createRange();
is(r.startContainer, pi, "Wrong startContainer!");
is(r.startOffset, 0, "Wrong startOffset!");
is(r.endContainer, pi, "Wrong endContainer!");
is(r.endOffset, pi.length, "Wrong endOffset!");

var df = r.cloneContents();
is(df.childNodes.length, 1, "Unexpected child nodes?");
ok(df.firstChild.isEqualNode(pi), "Wrong cloning?");

r.setStart(pi, 1);
r.setEnd(pi, 3);
df = r.cloneContents();
is(df.childNodes.length, 1, "Unexpected child nodes?");
ok(!df.firstChild.isEqualNode(pi), "Should clone to similar pi!");
is(, "at", "Wrong data cloning?");

is(r.toString(), document.getElementById("rangetest").textContent,
   "Wrong range stringification!");
   "Wrong pi cloning!");
   "Wrong pi cloning!");