Changeset 225566 in webkit


Ignore:
Timestamp:
Dec 5, 2017 8:47:00 PM (6 years ago)
Author:
Chris Dumez
Message:

ServiceWorkerGlobalScope prototype chain should be immutable
https://bugs.webkit.org/show_bug.cgi?id=180450

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline test that no longer times out.

  • web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt:

Source/WebCore:

ServiceWorkerGlobalScope prototype chain should be immutable, similarly
to what we do for DOMWindow. This is covered by a web-platform-test
which was timing out because it was successfuly overwriting the
ServiceWorkerGlobalScope prototype.

No new tests, rebaselined existing test.

  • workers/DedicatedWorkerGlobalScope.idl:
  • workers/WorkerGlobalScope.idl:
  • workers/service/ServiceWorkerGlobalScope.idl:

LayoutTests:

Unskip test that no longer times out.

Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r225562 r225566  
     12017-12-05  Chris Dumez  <cdumez@apple.com>
     2
     3        ServiceWorkerGlobalScope prototype chain should be immutable
     4        https://bugs.webkit.org/show_bug.cgi?id=180450
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * TestExpectations:
     9        Unskip test that no longer times out.
     10
    1112017-12-05  Brent Fulgham  <bfulgham@apple.com>
    212
  • trunk/LayoutTests/TestExpectations

    r225561 r225566  
    150150imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-partial-stream.https.html [ Skip ]
    151151imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html [ Skip ]
    152 imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https.html [ Skip ]
    153152imported/w3c/web-platform-tests/service-workers/service-worker/navigation-preload/broken-chunked-encoding.https.html [ Skip ]
    154153imported/w3c/web-platform-tests/service-workers/service-worker/navigation-preload/chunked-encoding.https.html [ Skip ]
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r225561 r225566  
     12017-12-05  Chris Dumez  <cdumez@apple.com>
     2
     3        ServiceWorkerGlobalScope prototype chain should be immutable
     4        https://bugs.webkit.org/show_bug.cgi?id=180450
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Rebaseline test that no longer times out.
     9
     10        * web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt:
     11
    1122017-12-05  Javier Fernandez  <jfernandez@igalia.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt

    r225549 r225566  
    1 
    2 Harness Error (TIMEOUT), message = null
    31
    42PASS Interfaces and attributes in ServiceWorkerGlobalScope
    5 TIMEOUT test setup (cache creation) Test timed out
     3PASS test setup (cache creation)
    64FAIL Event constructors assert_equals: Default FetchEvent.clientId should be null expected (object) null but got (string) ""
    75PASS xhr is not exposed
     
    108PASS ServiceWorkerGlobalScope interface object name
    119PASS ServiceWorkerGlobalScope interface: existence and properties of interface prototype object
    12 TIMEOUT ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to a new value via Object.setPrototypeOf should throw a TypeError Test timed out
     10PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to a new value via Object.setPrototypeOf should throw a TypeError
     11PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to a new value via __proto__ should throw a TypeError
     12PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to a new value via Reflect.setPrototypeOf should return false
     13PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to its original value via Object.setPrototypeOf should not throw
     14PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to its original value via __proto__ should not throw
     15PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to its original value via Reflect.setPrototypeOf should return true
     16PASS ServiceWorkerGlobalScope interface: existence and properties of interface prototype object's "constructor" property
     17FAIL ServiceWorkerGlobalScope interface: attribute clients The ServiceWorkerGlobalScope.clients getter can only be used on instances of ServiceWorkerGlobalScope
     18FAIL ServiceWorkerGlobalScope interface: attribute registration The ServiceWorkerGlobalScope.registration getter can only be used on instances of ServiceWorkerGlobalScope
     19PASS ServiceWorkerGlobalScope interface: operation skipWaiting()
     20FAIL ServiceWorkerGlobalScope interface: attribute oninstall The ServiceWorkerGlobalScope.oninstall getter can only be used on instances of ServiceWorkerGlobalScope
     21FAIL ServiceWorkerGlobalScope interface: attribute onactivate The ServiceWorkerGlobalScope.onactivate getter can only be used on instances of ServiceWorkerGlobalScope
     22FAIL ServiceWorkerGlobalScope interface: attribute onfetch The ServiceWorkerGlobalScope.onfetch getter can only be used on instances of ServiceWorkerGlobalScope
     23FAIL ServiceWorkerGlobalScope interface: attribute onmessage The ServiceWorkerGlobalScope.onmessage getter can only be used on instances of ServiceWorkerGlobalScope
     24FAIL ServiceWorkerGlobalScope interface: attribute onmessageerror The ServiceWorkerGlobalScope.onmessageerror getter can only be used on instances of ServiceWorkerGlobalScope
     25PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via Object.setPrototypeOf should throw a TypeError
     26PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via __proto__ should throw a TypeError
     27PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via Reflect.setPrototypeOf should return false
     28PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to its original value via Object.setPrototypeOf should not throw
     29PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to its original value via __proto__ should not throw
     30PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to its original value via Reflect.setPrototypeOf should return true
     31PASS ServiceWorkerGlobalScope must be primary interface of self
     32PASS Stringification of self
     33PASS ServiceWorkerGlobalScope interface: self must inherit property "clients" with the proper type
     34PASS ServiceWorkerGlobalScope interface: self must inherit property "registration" with the proper type
     35PASS ServiceWorkerGlobalScope interface: self must inherit property "skipWaiting()" with the proper type
     36PASS ServiceWorkerGlobalScope interface: self must inherit property "oninstall" with the proper type
     37PASS ServiceWorkerGlobalScope interface: self must inherit property "onactivate" with the proper type
     38PASS ServiceWorkerGlobalScope interface: self must inherit property "onfetch" with the proper type
     39PASS ServiceWorkerGlobalScope interface: self must inherit property "onmessage" with the proper type
     40PASS ServiceWorkerGlobalScope interface: self must inherit property "onmessageerror" with the proper type
     41PASS Client interface: existence and properties of interface object
     42PASS Client interface object length
     43PASS Client interface object name
     44PASS Client interface: existence and properties of interface prototype object
     45PASS Client interface: existence and properties of interface prototype object's "constructor" property
     46PASS Client interface: attribute url
     47PASS Client interface: attribute id
     48PASS Client interface: attribute type
     49FAIL Client interface: attribute reserved assert_true: The prototype object must have a property "reserved" expected true got false
     50PASS Client interface: operation postMessage(any, [object Object])
     51PASS WindowClient interface: existence and properties of interface object
     52PASS WindowClient interface object length
     53PASS WindowClient interface object name
     54PASS WindowClient interface: existence and properties of interface prototype object
     55PASS WindowClient interface: existence and properties of interface prototype object's "constructor" property
     56PASS WindowClient interface: attribute visibilityState
     57PASS WindowClient interface: attribute focused
     58FAIL WindowClient interface: attribute ancestorOrigins assert_true: The prototype object must have a property "ancestorOrigins" expected true got false
     59PASS WindowClient interface: operation focus()
     60PASS WindowClient interface: operation navigate(USVString)
     61PASS Clients interface: existence and properties of interface object
     62PASS Clients interface object length
     63PASS Clients interface object name
     64PASS Clients interface: existence and properties of interface prototype object
     65PASS Clients interface: existence and properties of interface prototype object's "constructor" property
     66PASS Clients interface: operation get(DOMString)
     67PASS Clients interface: operation matchAll(ClientQueryOptions)
     68PASS Clients interface: operation openWindow(USVString)
     69PASS Clients interface: operation claim()
     70PASS Clients must be primary interface of self.clients
     71PASS Stringification of self.clients
     72PASS Clients interface: self.clients must inherit property "get(DOMString)" with the proper type
     73PASS Clients interface: calling get(DOMString) on self.clients with too few arguments must throw TypeError
     74PASS Clients interface: self.clients must inherit property "matchAll(ClientQueryOptions)" with the proper type
     75PASS Clients interface: calling matchAll(ClientQueryOptions) on self.clients with too few arguments must throw TypeError
     76PASS Clients interface: self.clients must inherit property "openWindow(USVString)" with the proper type
     77PASS Clients interface: calling openWindow(USVString) on self.clients with too few arguments must throw TypeError
     78PASS Clients interface: self.clients must inherit property "claim()" with the proper type
     79PASS ServiceWorker interface: existence and properties of interface object
     80PASS ServiceWorker interface object length
     81PASS ServiceWorker interface object name
     82PASS ServiceWorker interface: existence and properties of interface prototype object
     83PASS ServiceWorker interface: existence and properties of interface prototype object's "constructor" property
     84PASS ServiceWorker interface: attribute scriptURL
     85PASS ServiceWorker interface: attribute state
     86PASS ServiceWorker interface: operation postMessage(any, [object Object])
     87PASS ServiceWorker interface: attribute onstatechange
     88PASS ServiceWorkerRegistration interface: existence and properties of interface object
     89PASS ServiceWorkerRegistration interface object length
     90PASS ServiceWorkerRegistration interface object name
     91PASS ServiceWorkerRegistration interface: existence and properties of interface prototype object
     92PASS ServiceWorkerRegistration interface: existence and properties of interface prototype object's "constructor" property
     93PASS ServiceWorkerRegistration interface: attribute installing
     94PASS ServiceWorkerRegistration interface: attribute waiting
     95PASS ServiceWorkerRegistration interface: attribute active
     96FAIL ServiceWorkerRegistration interface: attribute navigationPreload assert_true: The prototype object must have a property "navigationPreload" expected true got false
     97PASS ServiceWorkerRegistration interface: attribute scope
     98PASS ServiceWorkerRegistration interface: attribute updateViaCache
     99PASS ServiceWorkerRegistration interface: operation update()
     100PASS ServiceWorkerRegistration interface: operation unregister()
     101PASS ServiceWorkerRegistration interface: attribute onupdatefound
     102PASS ServiceWorkerRegistration must be primary interface of self.registration
     103PASS Stringification of self.registration
     104PASS ServiceWorkerRegistration interface: self.registration must inherit property "installing" with the proper type
     105PASS ServiceWorkerRegistration interface: self.registration must inherit property "waiting" with the proper type
     106PASS ServiceWorkerRegistration interface: self.registration must inherit property "active" with the proper type
     107FAIL ServiceWorkerRegistration interface: self.registration must inherit property "navigationPreload" with the proper type assert_inherits: property "navigationPreload" not found in prototype chain
     108PASS ServiceWorkerRegistration interface: self.registration must inherit property "scope" with the proper type
     109PASS ServiceWorkerRegistration interface: self.registration must inherit property "updateViaCache" with the proper type
     110PASS ServiceWorkerRegistration interface: self.registration must inherit property "update()" with the proper type
     111PASS ServiceWorkerRegistration interface: self.registration must inherit property "unregister()" with the proper type
     112PASS ServiceWorkerRegistration interface: self.registration must inherit property "onupdatefound" with the proper type
     113PASS EventTarget interface: self.registration must inherit property "addEventListener(DOMString, EventListener, [object Object],[object Object])" with the proper type
     114PASS EventTarget interface: calling addEventListener(DOMString, EventListener, [object Object],[object Object]) on self.registration with too few arguments must throw TypeError
     115PASS EventTarget interface: self.registration must inherit property "removeEventListener(DOMString, EventListener, [object Object],[object Object])" with the proper type
     116PASS EventTarget interface: calling removeEventListener(DOMString, EventListener, [object Object],[object Object]) on self.registration with too few arguments must throw TypeError
     117PASS EventTarget interface: self.registration must inherit property "dispatchEvent(Event)" with the proper type
     118PASS EventTarget interface: calling dispatchEvent(Event) on self.registration with too few arguments must throw TypeError
     119PASS EventTarget interface: existence and properties of interface object
     120PASS EventTarget interface object length
     121PASS EventTarget interface object name
     122PASS EventTarget interface: existence and properties of interface prototype object
     123PASS EventTarget interface: existence and properties of interface prototype object's "constructor" property
     124PASS EventTarget interface: operation addEventListener(DOMString, EventListener, [object Object],[object Object])
     125PASS EventTarget interface: operation removeEventListener(DOMString, EventListener, [object Object],[object Object])
     126PASS EventTarget interface: operation dispatchEvent(Event)
     127FAIL NavigationPreloadManager interface: existence and properties of interface object assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     128FAIL NavigationPreloadManager interface object length assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     129FAIL NavigationPreloadManager interface object name assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     130FAIL NavigationPreloadManager interface: existence and properties of interface prototype object assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     131FAIL NavigationPreloadManager interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     132FAIL NavigationPreloadManager interface: operation enable() assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     133FAIL NavigationPreloadManager interface: operation disable() assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     134FAIL NavigationPreloadManager interface: operation setHeaderValue(ByteString) assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     135FAIL NavigationPreloadManager interface: operation getState() assert_own_property: self does not have own property "NavigationPreloadManager" expected property "NavigationPreloadManager" missing
     136PASS Cache interface: existence and properties of interface object
     137PASS Cache interface object length
     138PASS Cache interface object name
     139PASS Cache interface: existence and properties of interface prototype object
     140PASS Cache interface: existence and properties of interface prototype object's "constructor" property
     141PASS Cache interface: operation match(RequestInfo, CacheQueryOptions)
     142PASS Cache interface: operation matchAll(RequestInfo, CacheQueryOptions)
     143PASS Cache interface: operation add(RequestInfo)
     144PASS Cache interface: operation addAll([object Object])
     145PASS Cache interface: operation put(RequestInfo, Response)
     146PASS Cache interface: operation delete(RequestInfo, CacheQueryOptions)
     147PASS Cache interface: operation keys(RequestInfo, CacheQueryOptions)
     148PASS Cache must be primary interface of self.cacheInstance
     149PASS Stringification of self.cacheInstance
     150PASS Cache interface: self.cacheInstance must inherit property "match(RequestInfo, CacheQueryOptions)" with the proper type
     151PASS Cache interface: calling match(RequestInfo, CacheQueryOptions) on self.cacheInstance with too few arguments must throw TypeError
     152PASS Cache interface: self.cacheInstance must inherit property "matchAll(RequestInfo, CacheQueryOptions)" with the proper type
     153PASS Cache interface: calling matchAll(RequestInfo, CacheQueryOptions) on self.cacheInstance with too few arguments must throw TypeError
     154PASS Cache interface: self.cacheInstance must inherit property "add(RequestInfo)" with the proper type
     155PASS Cache interface: calling add(RequestInfo) on self.cacheInstance with too few arguments must throw TypeError
     156PASS Cache interface: self.cacheInstance must inherit property "addAll([object Object])" with the proper type
     157PASS Cache interface: calling addAll([object Object]) on self.cacheInstance with too few arguments must throw TypeError
     158PASS Cache interface: self.cacheInstance must inherit property "put(RequestInfo, Response)" with the proper type
     159PASS Cache interface: calling put(RequestInfo, Response) on self.cacheInstance with too few arguments must throw TypeError
     160PASS Cache interface: self.cacheInstance must inherit property "delete(RequestInfo, CacheQueryOptions)" with the proper type
     161PASS Cache interface: calling delete(RequestInfo, CacheQueryOptions) on self.cacheInstance with too few arguments must throw TypeError
     162PASS Cache interface: self.cacheInstance must inherit property "keys(RequestInfo, CacheQueryOptions)" with the proper type
     163PASS Cache interface: calling keys(RequestInfo, CacheQueryOptions) on self.cacheInstance with too few arguments must throw TypeError
     164PASS CacheStorage interface: existence and properties of interface object
     165PASS CacheStorage interface object length
     166PASS CacheStorage interface object name
     167PASS CacheStorage interface: existence and properties of interface prototype object
     168PASS CacheStorage interface: existence and properties of interface prototype object's "constructor" property
     169PASS CacheStorage interface: operation match(RequestInfo, CacheQueryOptions)
     170PASS CacheStorage interface: operation has(DOMString)
     171PASS CacheStorage interface: operation open(DOMString)
     172PASS CacheStorage interface: operation delete(DOMString)
     173PASS CacheStorage interface: operation keys()
     174PASS CacheStorage must be primary interface of self.caches
     175PASS Stringification of self.caches
     176PASS CacheStorage interface: self.caches must inherit property "match(RequestInfo, CacheQueryOptions)" with the proper type
     177PASS CacheStorage interface: calling match(RequestInfo, CacheQueryOptions) on self.caches with too few arguments must throw TypeError
     178PASS CacheStorage interface: self.caches must inherit property "has(DOMString)" with the proper type
     179PASS CacheStorage interface: calling has(DOMString) on self.caches with too few arguments must throw TypeError
     180PASS CacheStorage interface: self.caches must inherit property "open(DOMString)" with the proper type
     181PASS CacheStorage interface: calling open(DOMString) on self.caches with too few arguments must throw TypeError
     182PASS CacheStorage interface: self.caches must inherit property "delete(DOMString)" with the proper type
     183PASS CacheStorage interface: calling delete(DOMString) on self.caches with too few arguments must throw TypeError
     184PASS CacheStorage interface: self.caches must inherit property "keys()" with the proper type
    13185
  • trunk/Source/WebCore/ChangeLog

    r225565 r225566  
     12017-12-05  Chris Dumez  <cdumez@apple.com>
     2
     3        ServiceWorkerGlobalScope prototype chain should be immutable
     4        https://bugs.webkit.org/show_bug.cgi?id=180450
     5
     6        Reviewed by Youenn Fablet.
     7
     8        ServiceWorkerGlobalScope prototype chain should be immutable, similarly
     9        to what we do for DOMWindow. This is covered by a web-platform-test
     10        which was timing out because it was successfuly overwriting the
     11        ServiceWorkerGlobalScope prototype.
     12
     13        No new tests, rebaselined existing test.
     14
     15        * workers/DedicatedWorkerGlobalScope.idl:
     16        * workers/WorkerGlobalScope.idl:
     17        * workers/service/ServiceWorkerGlobalScope.idl:
     18
    1192017-12-05  Basuke Suzuki  <Basuke.Suzuki@sony.com>
    220
  • trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl

    r209303 r225566  
    3434    Global=(Worker,DedicatedWorker),
    3535    JSGenerateToNativeObject,
     36    IsImmutablePrototypeExoticObject,
     37    IsImmutablePrototypeExoticObjectOnPrototype,
    3638] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
    3739    [CallWith=ScriptState, MayThrowException] void postMessage(any message, optional sequence<object> transfer = []);
  • trunk/Source/WebCore/workers/WorkerGlobalScope.idl

    r217181 r225566  
    2929    JSCustomMarkFunction,
    3030    JSLegacyParent=JSWorkerGlobalScopeBase,
     31    IsImmutablePrototypeExoticObject,
     32    IsImmutablePrototypeExoticObjectOnPrototype,
    3133] interface WorkerGlobalScope : EventTarget {
    3234
  • trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl

    r225249 r225566  
    3131    EnabledAtRuntime=ServiceWorker,
    3232    JSCustomMarkFunction,
     33    IsImmutablePrototypeExoticObject,
     34    IsImmutablePrototypeExoticObjectOnPrototype,
    3335] interface ServiceWorkerGlobalScope : WorkerGlobalScope {
    3436    [SameObject] readonly attribute ServiceWorkerClients clients;
Note: See TracChangeset for help on using the changeset viewer.