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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/fetch-cache-override-worker.js

Issue 647493002: Move promise_test and assert_promise_rejects out of worker-test-harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@geofencing_serviceworker
Patch Set: rebase Created 6 years, 2 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 importScripts('worker-test-harness.js'); 1 importScripts('worker-testharness.js');
2 importScripts('../../resources/testharness-helpers.js');
2 importScripts('test-helpers.js'); 3 importScripts('test-helpers.js');
3 4
4 promise_test(function() { 5 promise_test(function() {
5 var lastModified = ''; 6 var lastModified = '';
6 var eTag = ''; 7 var eTag = '';
7 var url = 'other.html'; 8 var url = 'other.html';
8 var expectedText = '<!DOCTYPE html>\n<title>Other</title>\n' + 9 var expectedText = '<!DOCTYPE html>\n<title>Other</title>\n' +
9 'Here\'s an other html file.\n'; 10 'Here\'s an other html file.\n';
10 return fetch(url) 11 return fetch(url)
11 .then(function(res) { 12 .then(function(res) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 189
189 return fetch('fetch-status.php?status=304'); 190 return fetch('fetch-status.php?status=304');
190 }) 191 })
191 .then(function(res) { 192 .then(function(res) {
192 assert_equals( 193 assert_equals(
193 res.status, 304 , 194 res.status, 304 ,
194 'When the server returns 304 and there\'s a cache miss, the ' + 195 'When the server returns 304 and there\'s a cache miss, the ' +
195 'response status must be 304.'); 196 'response status must be 304.');
196 }) 197 })
197 }, '304 handling for fetch().'); 198 }, '304 handling for fetch().');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698