Bug 1263469 P4 Update test_eventsource_intercept.html to validate FetchEvent.request.cache. r=ehsan
authorBen Kelly <ben@wanderview.com>
Fri, 15 Apr 2016 11:15:58 -0700
changeset 331380 a8392b3322a93d68b123be2d10e7727e3ba8298a
parent 331379 afd29752788807ef5cb8917ba033eb7f00631039
child 331381 6d66f5a53c094ec21088c38266b444c5f8ddd714
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1263469
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1263469 P4 Update test_eventsource_intercept.html to validate FetchEvent.request.cache. r=ehsan
dom/workers/test/serviceworkers/eventsource/eventsource_cors_response_intercept_worker.js
dom/workers/test/serviceworkers/eventsource/eventsource_mixed_content_cors_response_intercept_worker.js
dom/workers/test/serviceworkers/eventsource/eventsource_opaque_response_intercept_worker.js
--- a/dom/workers/test/serviceworkers/eventsource/eventsource_cors_response_intercept_worker.js
+++ b/dom/workers/test/serviceworkers/eventsource/eventsource_cors_response_intercept_worker.js
@@ -7,13 +7,14 @@ self.addEventListener('fetch', function 
   var request = event.request;
   var url = new URL(request.url);
 
   if (url.pathname !== '/tests/dom/workers/test/serviceworkers/eventsource/eventsource.resource') {
     return;
   }
 
   ok(request.mode === 'cors', 'EventSource should make a CORS request');
+  ok(request.cache === 'no-store', 'EventSource should make a no-store request');
   var fetchRequest = new Request(prefix + 'eventsource.resource', { mode: 'cors'});
   event.respondWith(fetch(fetchRequest).then((fetchResponse) => {
     return fetchResponse;
   }));
 });
--- a/dom/workers/test/serviceworkers/eventsource/eventsource_mixed_content_cors_response_intercept_worker.js
+++ b/dom/workers/test/serviceworkers/eventsource/eventsource_mixed_content_cors_response_intercept_worker.js
@@ -6,13 +6,14 @@ self.addEventListener('fetch', function 
   var request = event.request;
   var url = new URL(request.url);
 
   if (url.pathname !== '/tests/dom/workers/test/serviceworkers/eventsource/eventsource.resource') {
     return;
   }
 
   ok(request.mode === 'cors', 'EventSource should make a CORS request');
+  ok(request.cache === 'no-store', 'EventSource should make a no-store request');
   var fetchRequest = new Request(prefix + 'eventsource.resource', { mode: 'cors'});
   event.respondWith(fetch(fetchRequest).then((fetchResponse) => {
     return fetchResponse;
   }));
 });
--- a/dom/workers/test/serviceworkers/eventsource/eventsource_opaque_response_intercept_worker.js
+++ b/dom/workers/test/serviceworkers/eventsource/eventsource_opaque_response_intercept_worker.js
@@ -7,13 +7,14 @@ self.addEventListener('fetch', function 
   var request = event.request;
   var url = new URL(request.url);
 
   if (url.pathname !== '/tests/dom/workers/test/serviceworkers/eventsource/eventsource.resource') {
     return;
   }
 
   ok(request.mode === 'cors', 'EventSource should make a CORS request');
+  ok(request.cache === 'no-store', 'EventSource should make a no-store request');
   var fetchRequest = new Request(prefix + 'eventsource.resource', { mode: 'no-cors'});
   event.respondWith(fetch(fetchRequest).then((fetchResponse) => {
     return fetchResponse;
   }));
 });