Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event.html |
index a27c2b9490fdff21e50bdaec2743070d49166626..5727db91180bb345d90b46df8278e29fe7e7afcd 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event.html |
@@ -110,6 +110,25 @@ async_test(function(t) { |
}, 'Service Worker responds to fetch event with a client id'); |
async_test(function(t) { |
+ var scope = 'resources/simple.html?accept'; |
+ 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(frame) { |
+ assert_equals( |
+ frame.contentDocument.body.textContent, |
+ // Spec: 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', |
+ 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', |
+ 'Accept header value for navigation request should be visible to Service Worker'); |
+ frame.remove(); |
nhiroki
2016/04/11 08:33:29
Thanks to (*), an iframe created by with_iframe()
|
+ return service_worker_unregister_and_done(t, scope); |
+ }) |
+ .catch(unreached_rejection(t)); |
+ }, 'Accept header value for navigation request visible to Service Worker'); |
+ |
+async_test(function(t) { |
var scope = 'resources/simple.html?ignore'; |
service_worker_unregister_and_register(t, worker, scope) |
.then(function(reg) { |