diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/service-workers/stub-5.2-cross-origin-resources.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/service-workers/stub-5.2-cross-origin-resources.html')
-rw-r--r-- | testing/web-platform/tests/service-workers/stub-5.2-cross-origin-resources.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/testing/web-platform/tests/service-workers/stub-5.2-cross-origin-resources.html b/testing/web-platform/tests/service-workers/stub-5.2-cross-origin-resources.html new file mode 100644 index 000000000..42c685b1d --- /dev/null +++ b/testing/web-platform/tests/service-workers/stub-5.2-cross-origin-resources.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> +<title>Service Workers: Cross-Origin Resources & CORS</title> + <head> + <link rel="help" href="https://w3c.github.io/ServiceWorker/#cross-origin-resources"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + + </head> + <body> + +<!-- + +Applications tend to cache items that come from a CDN or other domain. It is +possible to request many of them directly using <script>, <img>, <video> and +<link> elements. It would be hugely limiting if this sort of runtime +collaboration broke when offline. Similarly, it is possible to XHR many sorts +of off-domain resources when appropriate CORS headers are set. + +ServiceWorkers enable this by allowing `Cache`s to fetch and cache off-origin +items. Some restrictions apply, however. First, unlike same-origin resources +which are managed in the `Cache` as `[Promise][1]`s for `Response` instances, +the objects stored are `[Promise][1]`s for `OpaqueResponse` instances. +`OpaqueResponse` provides a much less expressive API than `Response`; the +bodies and headers cannot be read or set, nor many of the other aspects of +their content inspected. They can be passed to `respondWith()` and +`forwardTo()` in the same manner as `Response`s, but cannot be meaningfully +created programmatically. These limitations are necessary to preserve the +security invariants of the platform. Allowing `Cache`s to store them allows +applications to avoid re-architecting in most cases. + + + +[1]: http://goo.gl/3TobQS + +--> + + + + <script> + test(function() { + // not_implemented(); + }, "There are no tests for section Cross-Origin Resources & CORS so far."); + </script> + + </body> +</html> + |