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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event.html

Issue 1853333005: Add layout tests to check Accept request header values observed by Service Worker Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698