mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1443850 P2 Add a WPT test verifying synthetic responses work when a request fragment is present. r=asuth
--HG-- extra : rebase_source : 0187a366a1e92ae48f5a10d04db3588465c2d2b6
This commit is contained in:
parent
bb67e81bca
commit
247ba17756
@ -58,6 +58,30 @@ async_test(function(t) {
|
||||
.catch(unreached_rejection(t));
|
||||
}, 'Service Worker responds to fetch event with string');
|
||||
|
||||
async_test(function(t) {
|
||||
var scope = 'resources/simple.html?string';
|
||||
var frame;
|
||||
service_worker_unregister_and_register(t, worker, scope)
|
||||
.then(function(reg) {
|
||||
return wait_for_state(t, reg.installing, 'activated');
|
||||
})
|
||||
.then(function() { return with_iframe(scope) })
|
||||
.then(function(f) {
|
||||
frame = f;
|
||||
return frame.contentWindow.fetch(scope + "#foo")
|
||||
})
|
||||
.then(function(response) { return response.text() })
|
||||
.then(function(text) {
|
||||
assert_equals(
|
||||
text,
|
||||
'Test string',
|
||||
'Service Worker should respond to fetch with a test string');
|
||||
frame.remove();
|
||||
return service_worker_unregister_and_done(t, scope);
|
||||
})
|
||||
.catch(unreached_rejection(t));
|
||||
}, 'Service Worker responds to fetch event using request fragment with string');
|
||||
|
||||
async_test(function(t) {
|
||||
var scope = 'resources/simple.html?blob';
|
||||
service_worker_unregister_and_register(t, worker, scope)
|
||||
|
Loading…
Reference in New Issue
Block a user