11cb0ef41Sopenharmony_ci// META: global=window,dedicatedworker,shadowrealm 21cb0ef41Sopenharmony_ci"use strict"; 31cb0ef41Sopenharmony_ci// https://webidl.spec.whatwg.org/#es-namespaces 41cb0ef41Sopenharmony_ci// https://console.spec.whatwg.org/#console-namespace 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_citest(() => { 71cb0ef41Sopenharmony_ci assert_true(self.hasOwnProperty("console")); 81cb0ef41Sopenharmony_ci}, "console exists on the global object"); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_citest(() => { 111cb0ef41Sopenharmony_ci const propDesc = Object.getOwnPropertyDescriptor(self, "console"); 121cb0ef41Sopenharmony_ci assert_equals(propDesc.writable, true, "must be writable"); 131cb0ef41Sopenharmony_ci assert_equals(propDesc.enumerable, false, "must not be enumerable"); 141cb0ef41Sopenharmony_ci assert_equals(propDesc.configurable, true, "must be configurable"); 151cb0ef41Sopenharmony_ci assert_equals(propDesc.value, console, "must have the right value"); 161cb0ef41Sopenharmony_ci}, "console has the right property descriptors"); 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_citest(() => { 191cb0ef41Sopenharmony_ci assert_false("Console" in self); 201cb0ef41Sopenharmony_ci}, "Console (uppercase, as if it were an interface) must not exist"); 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_citest(() => { 231cb0ef41Sopenharmony_ci const prototype1 = Object.getPrototypeOf(console); 241cb0ef41Sopenharmony_ci const prototype2 = Object.getPrototypeOf(prototype1); 251cb0ef41Sopenharmony_ci 261cb0ef41Sopenharmony_ci assert_equals(Object.getOwnPropertyNames(prototype1).length, 0, "The [[Prototype]] must have no properties"); 271cb0ef41Sopenharmony_ci assert_equals(prototype2, Object.prototype, "The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%"); 281cb0ef41Sopenharmony_ci}, "The prototype chain must be correct"); 29