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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/foreign-fetch-event-worker.js

Issue 2676733002: Upstream foreign fetch tests. (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 self.addEventListener('install', function(event) { 1 self.addEventListener('install', function(event) {
2 test(function() { 2 test(function() {
3 assert_throws(new TypeError(), function() { 3 assert_throws(new TypeError(), function() {
4 new ForeignFetchEvent('type'); 4 new ForeignFetchEvent('type');
5 }); 5 });
6 }, 'ForeignFetchEvent constructor with no init dict'); 6 }, 'ForeignFetchEvent constructor with no init dict');
7 7
8 test(function() { 8 test(function() {
9 assert_throws(new TypeError(), function() { 9 assert_throws(new TypeError(), function() {
10 new ForeignFetchEvent('type', {}); 10 new ForeignFetchEvent('type', {});
(...skipping 10 matching lines...) Expand all
21 var request = new Request('https://www.example.com/'); 21 var request = new Request('https://www.example.com/');
22 var event = new ForeignFetchEvent('type', { request: request, origin: 'o rigin' }); 22 var event = new ForeignFetchEvent('type', { request: request, origin: 'o rigin' });
23 assert_equals(event.type, 'type'); 23 assert_equals(event.type, 'type');
24 assert_equals(event.request, request); 24 assert_equals(event.request, request);
25 assert_equals(event.origin, 'origin'); 25 assert_equals(event.origin, 'origin');
26 }, 'ForeignFetchEvent constructor with all init dict members'); 26 }, 'ForeignFetchEvent constructor with all init dict members');
27 }); 27 });
28 28
29 // Import testharness after install handler to make sure our install handler 29 // Import testharness after install handler to make sure our install handler
30 // runs first. Otherwise only one test will run. 30 // runs first. Otherwise only one test will run.
31 importScripts('../../resources/testharness.js'); 31 importScripts('/resources/testharness.js');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698