html/browsers/sandboxing/resources/check-sandbox-flags.html?pipe=";
const allow_csp_from_star = "|header(Allow-CSP-From,*)";

// Return a promise, resolving when |element| triggers |event_name| event.
const future = (element, event_name, source) => {
  return new Promise(resolve => {
    element.addEventListener(event_name, event => {
      if (!source || source.contentWindow == event.source)
        resolve(event)
    })
  });
};

const check_sandbox_script = `
<script>
  try {
    document.domain = docume