11cb0ef41Sopenharmony_ci// Flags: --experimental-shadow-realm 21cb0ef41Sopenharmony_ci'use strict'; 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_cirequire('../common'); 51cb0ef41Sopenharmony_ciconst assert = require('assert'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci// Validates we can construct ShadowRealm successfully. 81cb0ef41Sopenharmony_ciconst shadowRealm = new ShadowRealm(); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst getter = shadowRealm.evaluate('globalThis.realmValue = "inner"; () => globalThis.realmValue;'); 111cb0ef41Sopenharmony_ciassert.strictEqual(getter(), 'inner'); 121cb0ef41Sopenharmony_ciassert.strictEqual('realmValue' in globalThis, false); 13