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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect.html

Issue 2785123002: Make no-location redirect response to be "opaque redirect" when redirect mode is manual. (Closed)
Patch Set: add link to crbug.com/707185 Created 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: Navigation redirection</title> 2 <title>Service Worker: Navigation redirection</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="../resources/get-host-info.js?pipe=sub"></script> 5 <script src="../resources/get-host-info.js?pipe=sub"></script>
6 <script src="resources/test-helpers.js"></script> 6 <script src="resources/test-helpers.js"></script>
7 <body> 7 <body>
8 <script> 8 <script>
9 9
10 var host_info = get_host_info(); 10 var host_info = get_host_info();
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 return setup_environment(t).then(function() { 363 return setup_environment(t).then(function() {
364 return test_redirect( 364 return test_redirect(
365 SCOPE1 + 'sw=opaque&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE), 365 SCOPE1 + 'sw=opaque&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
366 OTHER_ORIGIN_SCOPE, 366 OTHER_ORIGIN_SCOPE,
367 [[SCOPE1 + 'sw=opaque&url=' + 367 [[SCOPE1 + 'sw=opaque&url=' +
368 encodeURIComponent(OTHER_ORIGIN_SCOPE)], 368 encodeURIComponent(OTHER_ORIGIN_SCOPE)],
369 [], 369 [],
370 [OTHER_ORIGIN_SCOPE]]); 370 [OTHER_ORIGIN_SCOPE]]);
371 }); 371 });
372 }, 'Redirect to other-origin in-scope with opaque redirect response.'); 372 }, 'Redirect to other-origin in-scope with opaque redirect response.');
373 promise_test(function(t) {
374 return setup_environment(t).then(function() {
375 return test_redirect(
376 SCOPE1 + 'sw=opaque&noLocationRedirect',
377 SCOPE1 + 'sw=opaque&noLocationRedirect',
378 [[SCOPE1 + 'sw=opaque&noLocationRedirect'],
379 [],
380 []]);
381 });
382 }, 'No location redirect response.');
373 383
374 // Opaque redirect passed through Cache. 384 // Opaque redirect passed through Cache.
375 // SW responds with an opaque redirectresponse from the Cache API. 385 // SW responds with an opaque redirectresponse from the Cache API.
376 promise_test(function(t) { 386 promise_test(function(t) {
377 return setup_environment(t).then(function() { 387 return setup_environment(t).then(function() {
378 return test_redirect( 388 return test_redirect(
379 SCOPE1 + 'sw=opaqueThroughCache&url=' + 389 SCOPE1 + 'sw=opaqueThroughCache&url=' +
380 encodeURIComponent(OUT_SCOPE), 390 encodeURIComponent(OUT_SCOPE),
381 OUT_SCOPE, 391 OUT_SCOPE,
382 [[SCOPE1 + 'sw=opaqueThroughCache&url=' + 392 [[SCOPE1 + 'sw=opaqueThroughCache&url=' +
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 encodeURIComponent(OTHER_ORIGIN_SCOPE), 446 encodeURIComponent(OTHER_ORIGIN_SCOPE),
437 OTHER_ORIGIN_SCOPE, 447 OTHER_ORIGIN_SCOPE,
438 [[SCOPE1 + 'sw=opaqueThroughCache&url=' + 448 [[SCOPE1 + 'sw=opaqueThroughCache&url=' +
439 encodeURIComponent(OTHER_ORIGIN_SCOPE)], 449 encodeURIComponent(OTHER_ORIGIN_SCOPE)],
440 [], 450 [],
441 [OTHER_ORIGIN_SCOPE]]); 451 [OTHER_ORIGIN_SCOPE]]);
442 }); 452 });
443 }, 453 },
444 'Redirect to other-origin in-scope with opaque redirect response which ' + 454 'Redirect to other-origin in-scope with opaque redirect response which ' +
445 'is passed through Cache.'); 455 'is passed through Cache.');
456 promise_test(function(t) {
457 return setup_environment(t).then(function() {
458 return test_redirect(
459 SCOPE1 + 'sw=opaqueThroughCache&noLocationRedirect',
460 SCOPE1 + 'sw=opaqueThroughCache&noLocationRedirect',
461 [[SCOPE1 + 'sw=opaqueThroughCache&noLocationRedirect'],
462 [],
463 []]);
464 });
465 }, 'No location redirect response via Cache.');
466
446 </script> 467 </script>
447 </body> 468 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698