testing/web-platform/mozilla/tests/service-workers/service-worker/resources/fetch-request-resources-iframe.https.html
author James Graham <james@hoppipolla.co.uk>
Thu, 25 Jun 2015 16:10:50 -0700
changeset 250330 a03152790896f9304cf6b79e48de91cc0388cc64
child 268115 01dd15e9d65895469dd87a4b7c4699a34384e20e
permissions -rw-r--r--
Bug 1120505 - Add Blink service-worker tests to local wpt tests, rs=Ms2ger

<script src="/resources/testharness.js"></script>
<script src="test-helpers.sub.js?pipe=sub"></script>
<body>
<script>

function load_image(url, cross_origin) {
  var img = document.createElement('img');
  if (cross_origin != '') {
    img.crossOrigin = cross_origin;
  }
  img.src = url;
}

function load_script(url, cross_origin) {
  var script = document.createElement('script');
  script.src = url;
  if (cross_origin != '') {
    script.crossOrigin = cross_origin;
  }
  document.body.appendChild(script);
}

function load_css(url, cross_origin) {
  var link = document.createElement('link');
  link.rel = 'stylesheet'
  link.href = url;
  link.type = 'text/css';
  if (cross_origin != '') {
    link.crossOrigin = cross_origin;
  }
  document.body.appendChild(link);
}

function load_font(url) {
  var fontFace = new FontFace(url, 'url(' + url + ')');
  fontFace.load();
}

function load_css_image(url, type) {
  var div = document.createElement('div');
  document.body.appendChild(div);
  div.style[type] = 'url(' + url + ')';
}

function load_css_image_set(url, type) {
  var div = document.createElement('div');
  document.body.appendChild(div);
  div.style[type] = '-webkit-image-set(url(' + url + ') 1x)';
}

</script>
</body>