tree: 1868b29c77f7206468bb6016dc7e4bed10f25e09 [path history] [tgz]
  1. resources/
  2. img-html-correctly-labeled.sub-ref.html
  3. img-html-correctly-labeled.sub.html
  4. img-mime-types-coverage.tentative.sub.html
  5. img-png-mislabeled-as-html-nosniff.tentative.sub-ref.html
  6. img-png-mislabeled-as-html-nosniff.tentative.sub.html
  7. img-png-mislabeled-as-html.sub-ref.html
  8. img-png-mislabeled-as-html.sub.html
  9. OWNERS
  10. preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html
  11. README.md
  12. script-html-correctly-labeled.tentative.sub.html
  13. script-html-js-polyglot.sub.html
  14. script-html-via-cross-origin-blob-url.sub.html
  15. script-js-mislabeled-as-html-nosniff.sub.html
  16. script-js-mislabeled-as-html.sub.html
  17. script-resource-with-json-parser-breaker.tentative.sub.html
  18. script-resource-with-nonsniffable-types.tentative.sub.html
  19. style-css-mislabeled-as-html-nosniff.sub.html
  20. style-css-mislabeled-as-html.sub.html
  21. style-css-with-json-parser-breaker.sub.html
  22. style-html-correctly-labeled.sub.html
third_party/blink/web_tests/external/wpt/fetch/corb/README.md

Tests related to Cross-Origin Resource Blocking (CORB).

Summary

This directory contains tests related to the Cross-Origin Resource Blocking (CORB) algorithm.

The tests in this directory interact with various, random features, but the tests have been grouped together into the fetch/corb directory, because all of these tests verify behavior that is important to the CORB algorithm.

CORB is not universally implemented yet

CORB has been included in the Fetch spec since May 2018.

Some tests in this directory (e.g. css-with-json-parser-breaker) cover behavior spec-ed outside of CORB (making sure that CORB doesn‘t change the existing web behavior) and therefore are valuable independently from CORB’s standardization efforts and should already be passing across all browsers.

Tests that cover behavior that is changed by CORB are currently marked as tentative (using .tentative substring in their filename). Such tests may fail unless CORB is enabled. In practice this means that:

  • Such tests will pass in Chromium (where CORB is enabled by default since M68).
  • Such tests may fail in other browsers.

Limitations of WPT test coverage

CORB is a defense-in-depth and in general should not cause changes in behavior that can be observed by web features or by end users. This makes CORB difficult or even impossible to test via WPT.

WPT tests can cover the following:

  • Helping verify CORB has no observable impact in specific scenarios. Examples:
    • image rendering of (an empty response of) a html document blocked by CORB should be indistinguishable from rendering such html document without CORB - img-html-correctly-labeled.sub.html
    • CORB shouldn‘t block responses that don’t sniff as a CORB-protected document type - img-png-mislabeled-as-html.sub.html
  • Helping document cases where CORB causes observable changes in behavior. Examples:
    • blocking of nosniff images labeled as non-image, CORB-protected Content-Type - img-png-mislabeled-as-html-nosniff.tentative.sub.html
    • blocking of CORB-protected documents can prevent triggering syntax errors in scripts - script-html-via-cross-origin-blob-url.tentative.sub.html
  • Helping verify which MIME types are protected by CORB.

Examples of aspects that WPT tests cannot cover (these aspects have to be covered in other, browser-specific tests):

  • Verifying that CORB doesn't affect things that are only indirectly observable by the web (like prefetch.
  • Verifying that CORB strips headers of blocked responses.
  • Verifying that CORB blocks responses before they reach the process hosting a cross-origin execution context.