Re: [infra-tests] [webidl] Assert prototype immutability (#5788)

It looks like that method is referenced in the following files:

    $ grep setPrototypeOf . -rl
    ./js/behaviours/SetPrototypeOf-window.html
    ./html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html
    ./html/browsers/origin/cross-origin-objects/cross-origin-objects.html
    ./streams/writable-streams/properties.js
    ./common/test-setting-immutable-prototype.js

Maybe a little more instructive is searching for the `testSettingImmutablePrototype` function as defined in the final result above:

    $ grep testSettingImmutablePrototype . -rl
    ./html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub.html
    ./html/browsers/history/the-location-interface/location-prototype-setting-goes-cross-origin-domain.sub.html
    ./html/browsers/history/the-location-interface/location-prototype-setting-cross-origin-domain.sub.html
    ./html/browsers/history/the-location-interface/location-prototype-setting-same-origin.html
    ./html/browsers/history/the-location-interface/location-prototype-setting-cross-origin.sub.html
    ./html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin.html
    ./html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin-domain.sub.html
    ./html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html
    ./html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-domain.sub.html
    ./html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin.sub.html
    ./common/test-setting-immutable-prototype.js

...but even here, it seems as though we're missing coverage: ServiceWorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, and WorkerGlobalScope. There may be others today, and there's always the possibility for more being defined in the future. Part of the motivation for maintaining `idlharness.js` (as I understand it) is to address these details in a generic fashion so they can be applied consistently without the need for additional maintenance. From that perspective, including the assertion here seems like the best way to get coverage of this behavior.

View on GitHub: https://github.com/w3c/web-platform-tests/pull/5788#issuecomment-299244664

Received on Thursday, 4 May 2017 16:53:16 UTC