https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 9454b8e581454d3bf0dabb368f4cf90c8e3dcc6c authored by Geoffrey Sneddon on 27 August 2018, 16:01:41 UTC
Fix #12578: make SeleniumExecutor/WebDriverExecutor use the right size for reftests
Tip revision: 9454b8e
access-control-expose-headers-parsing.window.js
promise_test(() => fetch("resources/access-control-expose-headers.json").then(res => res.json()).then(runTests), "Loading JSON…");

function runTests(allTestData) {
  allTestData.forEach(testData => {
    const encodedInput = encodeURIComponent(testData.input);
    promise_test(() => {
      const relativeURL = "resources/expose-headers.py?expose=" + encodedInput,
            url = new URL(relativeURL, location.href).href.replace("://", "://élève.");
      return fetch(url).then(res => {
        assert_equals(res.headers.get("content-language"), "mkay");
        assert_equals(res.headers.get("bb-8"), (testData.exposed ? "hey" : null));
      });
    }, "Parsing: " + encodedInput);
  })
}
back to top