⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285954 in webkit


Ignore:
Timestamp:
Nov 17, 2021, 2:28:11 PM (5 years ago)
Author:
Chris Dumez
Message:

Web Locks API does get enabled in Service Workers when running layout tests
https://bugs.webkit.org/show_bug.cgi?id=233273

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing in service workers.

  • web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/clientids.tentative.https-expected.txt:
  • web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/secure-context.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt:

Source/WebCore:

Use RuntimeEnabledFeatures to back the Web Lock API since regular settings do not get
properly propagated to service workers at the moment.

No new tests, rebaselined existing ones.

  • Modules/web-locks/NavigatorLocks.idl:
  • Modules/web-locks/WebLock.idl:
  • Modules/web-locks/WebLockManager.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setWebLocksAPIEnabled):
(WebCore::RuntimeEnabledFeatures::webLocksAPIEnabled const):

Source/WTF:

Use RuntimeEnabledFeatures to back the Web Lock API since regular settings do not get
properly propagated to service workers at the moment.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r285921 r285954  
     12021-11-17  Chris Dumez  <cdumez@apple.com>
     2
     3        Web Locks API does get enabled in Service Workers when running layout tests
     4        https://bugs.webkit.org/show_bug.cgi?id=233273
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Rebaseline WPT tests now that more checks are passing in service workers.
     9
     10        * web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt:
     11        * web-platform-tests/web-locks/clientids.tentative.https-expected.txt:
     12        * web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt:
     13        * web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt:
     14        * web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt:
     15        * web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt:
     16        * web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt:
     17        * web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt:
     18        * web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt:
     19        * web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt:
     20        * web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt:
     21        * web-platform-tests/web-locks/secure-context.tentative.https.any.serviceworker-expected.txt:
     22        * web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt:
     23        * web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt:
     24
    1252021-11-17  Antti Koivisto  <antti@apple.com>
    226
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL navigator.locks.request requires a name and a callback promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL mode must be "shared" or "exclusive" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL The 'steal' and 'ifAvailable' options are mutually exclusive promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    5 FAIL The 'steal' option must be used with exclusive locks promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    6 FAIL The 'signal' and 'steal' options are mutually exclusive promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    7 FAIL The 'signal' and 'ifAvailable' options are mutually exclusive promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    8 FAIL callback must be a function promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    9 FAIL navigator.locks.request's returned promise resolves after lock is released promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    10 FAIL Returned Promise rejects if callback throws synchronously promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    11 FAIL Returned Promise rejects if callback throws asynchronously promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2Harness Error (FAIL), message = Unhandled rejection: The operation is not supported.
    123
     4PASS navigator.locks.request requires a name and a callback
     5FAIL mode must be "shared" or "exclusive" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     6PASS The 'steal' and 'ifAvailable' options are mutually exclusive
     7PASS The 'steal' option must be used with exclusive locks
     8PASS The 'signal' and 'steal' options are mutually exclusive
     9PASS The 'signal' and 'ifAvailable' options are mutually exclusive
     10PASS callback must be a function
     11FAIL navigator.locks.request's returned promise resolves after lock is released promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     12FAIL Returned Promise rejects if callback throws synchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]"
     13FAIL Returned Promise rejects if callback throws asynchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]"
     14
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/clientids.tentative.https-expected.txt

    r285012 r285954  
    11
    22
    3 FAIL Client IDs match between Locks API and Service Workers assert_equals: clientIds should match, but are different expected "14-85" but got "NotSupportedError: The operation is not supported."
     3FAIL Client IDs match between Locks API and Service Workers assert_equals: clientIds should match, but are different expected "15-85" but got "NotSupportedError: The operation is not supported."
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL callback's result is promisified if not async promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL lock is held until callback's returned promise resolves promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL lock is held until callback's returned promise rejects promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    5 FAIL held lock prevents the same client from acquiring it promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2Harness Error (TIMEOUT), message = null
    63
     4FAIL callback's result is promisified if not async promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     5TIMEOUT lock is held until callback's returned promise resolves Test timed out
     6NOTRUN lock is held until callback's returned promise rejects
     7NOTRUN held lock prevents the same client from acquiring it
     8
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    1616PASS WorkerNavigator includes NavigatorOnLine: member names are unique
    1717PASS WorkerNavigator includes NavigatorConcurrentHardware: member names are unique
    18 FAIL LockManager interface: existence and properties of interface object assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    19 FAIL LockManager interface object length assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    20 FAIL LockManager interface object name assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    21 FAIL LockManager interface: existence and properties of interface prototype object assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    22 FAIL LockManager interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    23 FAIL LockManager interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    24 FAIL LockManager interface: operation request(DOMString, LockGrantedCallback) assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    25 FAIL LockManager interface: operation request(DOMString, LockOptions, LockGrantedCallback) assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    26 FAIL LockManager interface: operation query() assert_own_property: self does not have own property "LockManager" expected property "LockManager" missing
    27 FAIL LockManager must be primary interface of navigator.locks assert_equals: wrong typeof object expected "object" but got "undefined"
    28 FAIL Stringification of navigator.locks assert_equals: wrong typeof object expected "object" but got "undefined"
    29 FAIL LockManager interface: navigator.locks must inherit property "request(DOMString, LockGrantedCallback)" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
    30 FAIL LockManager interface: calling request(DOMString, LockGrantedCallback) on navigator.locks with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    31 FAIL LockManager interface: navigator.locks must inherit property "request(DOMString, LockOptions, LockGrantedCallback)" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
    32 FAIL LockManager interface: calling request(DOMString, LockOptions, LockGrantedCallback) on navigator.locks with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    33 FAIL LockManager interface: navigator.locks must inherit property "query()" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
    34 FAIL Lock interface: existence and properties of interface object assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    35 FAIL Lock interface object length assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    36 FAIL Lock interface object name assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    37 FAIL Lock interface: existence and properties of interface prototype object assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    38 FAIL Lock interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    39 FAIL Lock interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    40 FAIL Lock interface: attribute name assert_own_property: self does not have own property "Lock" expected property "Lock" missing
    41 FAIL Lock interface: attribute mode assert_own_property: self does not have own property "Lock" expected property "Lock" missing
     18PASS LockManager interface: existence and properties of interface object
     19PASS LockManager interface object length
     20PASS LockManager interface object name
     21PASS LockManager interface: existence and properties of interface prototype object
     22PASS LockManager interface: existence and properties of interface prototype object's "constructor" property
     23PASS LockManager interface: existence and properties of interface prototype object's @@unscopables property
     24PASS LockManager interface: operation request(DOMString, LockGrantedCallback)
     25PASS LockManager interface: operation request(DOMString, LockOptions, LockGrantedCallback)
     26PASS LockManager interface: operation query()
     27PASS LockManager must be primary interface of navigator.locks
     28PASS Stringification of navigator.locks
     29PASS LockManager interface: navigator.locks must inherit property "request(DOMString, LockGrantedCallback)" with the proper type
     30PASS LockManager interface: calling request(DOMString, LockGrantedCallback) on navigator.locks with too few arguments must throw TypeError
     31PASS LockManager interface: navigator.locks must inherit property "request(DOMString, LockOptions, LockGrantedCallback)" with the proper type
     32PASS LockManager interface: calling request(DOMString, LockOptions, LockGrantedCallback) on navigator.locks with too few arguments must throw TypeError
     33PASS LockManager interface: navigator.locks must inherit property "query()" with the proper type
     34PASS Lock interface: existence and properties of interface object
     35PASS Lock interface object length
     36PASS Lock interface object name
     37PASS Lock interface: existence and properties of interface prototype object
     38PASS Lock interface: existence and properties of interface prototype object's "constructor" property
     39PASS Lock interface: existence and properties of interface prototype object's @@unscopables property
     40PASS Lock interface: attribute name
     41PASS Lock interface: attribute mode
    4242FAIL Lock must be primary interface of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock"
    4343FAIL Stringification of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock"
    4444FAIL Lock interface: lock must inherit property "name" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock"
    4545FAIL Lock interface: lock must inherit property "mode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock"
    46 FAIL WorkerNavigator interface: attribute locks assert_true: The prototype object must have a property "locks" expected true got false
    47 FAIL WorkerNavigator interface: navigator must inherit property "locks" with the proper type assert_inherits: property "locks" not found in prototype chain
     46PASS WorkerNavigator interface: attribute locks
     47PASS WorkerNavigator interface: navigator must inherit property "locks" with the proper type
    4848
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL Lock request with ifAvailable - lock available promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Lock request with ifAvailable - lock not available promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL Lock request with ifAvailable - lock not available, callback throws promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    5 FAIL Lock request with ifAvailable - unrelated lock held promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    6 FAIL Shared lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    7 FAIL Exclusive lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    8 FAIL Shared lock request with ifAvailable - exclusive lock held promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    9 FAIL Returned Promise rejects if callback throws synchronously promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    10 FAIL Returned Promise rejects if async callback yields rejected promise promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    11 FAIL Locks are available once previous release is processed promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2FAIL Lock request with ifAvailable - lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     3FAIL Lock request with ifAvailable - lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     4FAIL Lock request with ifAvailable - lock not available, callback throws promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     5FAIL Lock request with ifAvailable - unrelated lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     6FAIL Shared lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     7FAIL Exclusive lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     8FAIL Shared lock request with ifAvailable - exclusive lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     9FAIL Returned Promise rejects if callback throws synchronously promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     10FAIL Returned Promise rejects if async callback yields rejected promise promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     11FAIL Locks are available once previous release is processed promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL Lock attributes reflect requested properties (exclusive) promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Lock attributes reflect requested properties (shared) promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2FAIL Lock attributes reflect requested properties (exclusive) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     3FAIL Lock attributes reflect requested properties (shared) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Requests for distinct resources can be granted promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     3FAIL Requests for distinct resources can be granted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Releasing exclusive lock grants multiple shared locks promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL An exclusive lock between shared locks promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2Harness Error (FAIL), message = Unhandled rejection: The operation is not supported.
    53
     4FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     5FAIL Releasing exclusive lock grants multiple shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     6FAIL An exclusive lock between shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     7
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Shared locks are not exclusive promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     3FAIL Shared locks are not exclusive promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL query() returns dictionary with empty arrays when no locks are held promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.query')"
     2FAIL query() returns dictionary with empty arrays when no locks are held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL DOMString:  promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL DOMString: 0xD800 promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    5 FAIL DOMString: 0xDC00 promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    6 FAIL DOMString: 0xDC00 0xD800 promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    7 FAIL DOMString: 0xFFFF promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    8 FAIL Resource names that are not valid UTF-16 are not mangled promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    9 FAIL Names cannot start with "-" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2FAIL DOMString:  promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     3FAIL DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     4FAIL DOMString: 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     5FAIL DOMString: 0xDC00 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     6FAIL DOMString: 0xDC00 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     7FAIL DOMString: 0xFFFF promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     8FAIL Resource names that are not valid UTF-16 are not mangled promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     9FAIL Names cannot start with "-" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/secure-context.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL API presence in secure contexts assert_idl_attribute: navigator.locks exists in secure context property "locks" not found in prototype chain
     2PASS API presence in secure contexts
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL The signal option must be an AbortSignal promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Passing an already aborted signal aborts promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL An aborted request results in AbortError promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    5 FAIL Abort after a timeout promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    6 FAIL Signal that is not aborted promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    7 FAIL Synchronously signaled abort promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    8 FAIL Abort signaled after lock granted promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    9 FAIL Abort signaled after lock released promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    10 FAIL Abort should process the next pending lock request promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2Harness Error (TIMEOUT), message = null
    113
     4PASS The signal option must be an AbortSignal
     5FAIL Passing an already aborted signal aborts promise_rejects_dom: Request should reject with AbortError function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20
     6FAIL An aborted request results in AbortError promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     7FAIL Abort after a timeout promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     8FAIL Signal that is not aborted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     9FAIL Synchronously signaled abort promise_rejects_dom: Request should abort function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20
     10TIMEOUT Abort signaled after lock granted Test timed out
     11NOTRUN Abort signaled after lock released
     12NOTRUN Abort should process the next pending lock request
     13
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt

    r284982 r285954  
    11
    2 FAIL Lock available promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    3 FAIL Lock not available promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    4 FAIL Broken lock's release promise rejects promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    5 FAIL Requested lock's release promise is deferred promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
    6 FAIL Last caller wins promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.locks.request')"
     2Harness Error (FAIL), message = Unhandled rejection: The operation is not supported.
    73
     4FAIL Lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     5FAIL Lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     6FAIL Broken lock's release promise rejects promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     7FAIL Requested lock's release promise is deferred promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     8FAIL Last caller wins promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
     9
  • trunk/Source/WTF/ChangeLog

    r285936 r285954  
     12021-11-17  Chris Dumez  <cdumez@apple.com>
     2
     3        Web Locks API does get enabled in Service Workers when running layout tests
     4        https://bugs.webkit.org/show_bug.cgi?id=233273
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Use RuntimeEnabledFeatures to back the Web Lock API since regular settings do not get
     9        properly propagated to service workers at the moment.
     10
     11        * Scripts/Preferences/WebPreferencesExperimental.yaml:
     12
    1132021-11-17  Dean Jackson  <dino@apple.com>
    214
  • trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

    r285936 r285954  
    15401540  humanReadableName: "Web Locks API"
    15411541  humanReadableDescription: "Web Locks API"
     1542  webcoreBinding: RuntimeEnabledFeatures
    15421543  defaultValue:
    15431544    WebKitLegacy:
  • trunk/Source/WebCore/ChangeLog

    r285953 r285954  
     12021-11-17  Chris Dumez  <cdumez@apple.com>
     2
     3        Web Locks API does get enabled in Service Workers when running layout tests
     4        https://bugs.webkit.org/show_bug.cgi?id=233273
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Use RuntimeEnabledFeatures to back the Web Lock API since regular settings do not get
     9        properly propagated to service workers at the moment.
     10
     11        No new tests, rebaselined existing ones.
     12
     13        * Modules/web-locks/NavigatorLocks.idl:
     14        * Modules/web-locks/WebLock.idl:
     15        * Modules/web-locks/WebLockManager.idl:
     16        * page/RuntimeEnabledFeatures.h:
     17        (WebCore::RuntimeEnabledFeatures::setWebLocksAPIEnabled):
     18        (WebCore::RuntimeEnabledFeatures::webLocksAPIEnabled const):
     19
    1202021-11-17  Tim Horton  <timothy_horton@apple.com>
    221
  • trunk/Source/WebCore/Modules/web-locks/NavigatorLocks.idl

    r285012 r285954  
    2424
    2525[
    26     EnabledBySetting=WebLocksAPIEnabled,
     26    EnabledAtRuntime=WebLocksAPIEnabled,
    2727    SecureContext
    2828] interface mixin NavigatorLocks {
  • trunk/Source/WebCore/Modules/web-locks/WebLock.idl

    r285012 r285954  
    2424
    2525[
    26     EnabledBySetting=WebLocksAPIEnabled,
     26    EnabledAtRuntime=WebLocksAPIEnabled,
    2727    Exposed=(Window,Worker),
    2828    ImplementationLacksVTable,
  • trunk/Source/WebCore/Modules/web-locks/WebLockManager.idl

    r285012 r285954  
    2424
    2525[
    26     EnabledBySetting=WebLocksAPIEnabled,
     26    EnabledAtRuntime=WebLocksAPIEnabled,
    2727    Exposed=(Window,Worker),
    2828    InterfaceName=LockManager,
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r285936 r285954  
    264264#endif
    265265
     266    void setWebLocksAPIEnabled(bool isEnabled) { m_webLocksAPIEnabled = isEnabled; }
     267    bool webLocksAPIEnabled() const { return m_webLocksAPIEnabled; }
     268
    266269private:
    267270    // Never instantiate.
     
    408411#endif
    409412
     413    bool m_webLocksAPIEnabled { false };
     414
    410415    friend class NeverDestroyed<RuntimeEnabledFeatures>;
    411416};
Note: See TracChangeset for help on using the changeset viewer.