blob: 7547d6528bee95384beffe090529284a27b5cbbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
let cache;
let url = 'foo.html';
let redirectURL = 'http://example.com/foo-bar.html';
caches.open('redirect-' + context).then(c => {
cache = c;
var response = Response.redirect(redirectURL);
is(response.headers.get('Location'), redirectURL);
return cache.put(url, response);
}).then(_ => {
return cache.match(url);
}).then(response => {
is(response.headers.get('Location'), redirectURL);
testDone();
});
|