author Nicholas Nethercote <>
Mon, 05 Oct 2015 16:59:32 -0700
changeset 301715 3897da20e42dec0bcf73987af1eaac4f8ce950b8
parent 209533 ec32b97242217a8cc5c9641cbd9008d56f53e979
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.

  <meta charset="utf-8">
  <title>Test URL API - data:plain</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 1018682</a>

<script type="application/javascript">

var base = new URL("data:text/plain,");

base.protocol = "chrome:";
is(base.protocol, 'data:', "The protocol should not change from data to chrome.");

try {
  var relative = new URL("a", base);
  ok(false, "Relative URL from a data:text/plain should not work.");
} catch(e) {
  ok(true, "Relative URL from a data:text/plain should not work.");

base.protocol = "http:";
ok(true, "Protocol: http changed");
is(base.href, "http://text/plain,", "Base URL is correct");

var relative = new URL("a", base);
ok(relative, "This works.");
is(relative.href, "http://text/a", "Relative URL is correct");