From 796b6a18abf4fce63e79ea27f79baced27fabaed Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 3 Oct 2019 03:33:29 +0000 Subject: [PATCH] Bug 1465794 [wpt PR 11274] - Worker: Change the default credentials option from 'omit' to 'same-origin', a=testonly Automatic update from web-platform-testsWorker: Change the default credentials option from 'omit' to 'same-origin' This is a follow-up for the spec change: https://github.com/whatwg/html/pull/3656 Note that ES Modules for dedicated workers is still behind the flag and this change doesn't affect applications in the real world. Bug: 848247 Change-Id: I25083f3f11f9d13663e16e2f4c137095e9b12b01 Reviewed-on: https://chromium-review.googlesource.com/1080668 Reviewed-by: Matt Falkenhagen Commit-Queue: Hiroki Nakagawa Cr-Commit-Position: refs/heads/master{#563465} -- wpt-commits: 72c7cfed684554c0d65b7a33d413df9ae1c5999f wpt-pr: 11274 UltraBlame original commit: 8501df66d1b82cd635660d7868271fc02bd2f0fb --- testing/web-platform/meta/MANIFEST.json | 2 +- .../dedicated-worker-options-credentials.html | 131 +++++++----------- 2 files changed, 49 insertions(+), 84 deletions(-) diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 6c05fc22f4a13..630b623dc26af 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -4207389,7 +4207389,7 @@ html : [ " -1d6a1629f81d26efcd05bf1c7d40011609238f4f +f182ac364e933ce744b18c0ca6e03ae975a883a3 " " testharness diff --git a/testing/web-platform/tests/workers/modules/dedicated-worker-options-credentials.html b/testing/web-platform/tests/workers/modules/dedicated-worker-options-credentials.html index abed1342ed69a..bd9296e319313 100644 --- a/testing/web-platform/tests/workers/modules/dedicated-worker-options-credentials.html +++ b/testing/web-platform/tests/workers/modules/dedicated-worker-options-credentials.html @@ -208,21 +208,6 @@ = = ' -omit -' -) -return -' -' -; -if -( -options -. -credentials -= -= -' same - origin @@ -238,11 +223,28 @@ include ' ) +{ return ' COOKIE_VALUE ' ; +} +if +( +options +. +credentials += += +' +omit +' +) +return +' +' +; assert_unreached ( ' @@ -271,12 +273,20 @@ given WorkerOptions . -async function -runCredentialsTest +credentials_test ( options +description +) +{ +promise_test +( +async +( ) += +> { const worker @@ -340,6 +350,10 @@ ) ; } +description +) +; +} / / Tests @@ -347,13 +361,7 @@ module scripts . -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { type @@ -362,7 +370,6 @@ module ' } -) ' new Worker @@ -374,23 +381,24 @@ credentials option should -not -send +behave +as ' + ' +credentials += +same +- +origin +and +send the credentials ' ) ; -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { credentials @@ -404,7 +412,6 @@ module ' } -) ' new Worker @@ -422,13 +429,7 @@ ' ) ; -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { credentials @@ -444,7 +445,6 @@ module ' } -) ' new Worker @@ -463,13 +463,7 @@ ' ) ; -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { credentials @@ -483,7 +477,6 @@ module ' } -) ' new Worker @@ -507,13 +500,7 @@ classic scripts . -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { type @@ -522,7 +509,6 @@ classic ' } -) ' new Worker @@ -552,13 +538,7 @@ ' ) ; -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { credentials @@ -572,7 +552,6 @@ classic ' } -) ' new Worker @@ -602,13 +581,7 @@ ' ) ; -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { credentials @@ -624,7 +597,6 @@ classic ' } -) ' new Worker @@ -656,13 +628,7 @@ ' ) ; -promise_test -( -( -) -= -> -runCredentialsTest +credentials_test ( { credentials @@ -676,7 +642,6 @@ classic ' } -) ' new Worker