https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f7aab0af8bf4ffc4aa24ce4bb5299b0a063ff8ef authored by Adam Rice on 05 April 2018, 15:11:00 UTC
Streams: Constructors property lookup order
Tip revision: f7aab0a
svg-target-reftest.https.html
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>Service worker interception does not break SVG fragment targets</title>
<meta name="assert" content="SVG with link fragment should render correctly when intercepted by a service worker.">
<script src="resources/test-helpers.sub.js"></script>
<link rel="match" href="resources/svg-target-reftest-001.html">
<p>Pass if you see a green box below.</p>
<script>
// We want to use utility functions designed for testharness.js where
// there is a test object.  We don't have a test object in reftests
// so fake one for now.
const fake_test = { step_func: f => f };

async function runTest() {
  const script = './resources/pass-through-worker.js';
  const scope = './resources/svg-target-reftest-frame.html';
  let reg = await navigator.serviceWorker.register(script, { scope });
  await wait_for_state(fake_test, reg.installing, 'activated');
  let f = await with_iframe(scope);
  document.documentElement.classList.remove('reftest-wait');
  await reg.unregister();
  // Note, we cannot remove the frame explicitly because we can't
  // tell when the reftest completes.
}
runTest();
</script>
</html>
back to top