Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/opaque-response-in-memorycache-iframe.html

Issue 2877673004: Upstream service worker opaque-response-preloaded.https.html test to WPT (Closed)
Patch Set: Incorporate review feedback Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <body></body>
4 <script>
5 function runTest() {
6 var l = document.createElement('link');
7 l.setAttribute('rel', 'preload');
8 l.setAttribute('href', 'opaque-response');
9 l.onload = function() {
10 xhr = new XMLHttpRequest;
11 xhr.withCredentials = true;
12 xhr.open('GET', 'opaque-response');
13 // opaque-response returns an opaque response from serviceworker and thus
14 // the XHR must fail because it is not no-cors request.
15 // Particularly, the XHR must not reuse preloaded the opaque response on
16 // MemoryCache.
17 xhr.onerror = function() {
18 parent.done('PASS');
19 };
20 xhr.onload = function() {
21 parent.done('FAIL: ' + xhr.responseText);
22 };
23 xhr.send();
24 };
25 l.onerror = function() {
26 parent.done('FAIL: preload failed unexpectedly');
27 };
28 document.body.appendChild(l);
29 }
30 </script>
31 <body onload="setTimeout(runTest, 100)"></body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698