diff --git a/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-orginary-object.js b/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-ordinary-object.js similarity index 81% rename from test/built-ins/ShadowRealm/prototype/evaluate/globalthis-orginary-object.js rename to test/built-ins/ShadowRealm/prototype/evaluate/globalthis-ordinary-object.js index fd71e910268..fef470ea005 100644 --- a/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-orginary-object.js +++ b/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-ordinary-object.js @@ -64,3 +64,27 @@ assert.sameValue( true, 'globalThis.constructor is Object' ); + +assert.sameValue( + r.evaluate(` + let result; + try { + globalThis.__proto__ = {x: 2}; + result = true; + } catch (e) { + result = false; + } + result; + `), + true, + 'Can assign to globalThis.__proto__ directly' +); + +assert.sameValue( + r.evaluate(` + Reflect.set(globalThis.__proto__, {x: 1}) && + Reflect.setPrototypeOf(globalThis.__proto__, {x: 2}); + `), + true, + 'Can set an ordinary globalThis.__proto__' +);