MCPcopy Create free account
hub / github.com/LadybirdBrowser/ladybird / initialize

Method initialize

Libraries/LibTest/JavaScriptTestRunner.h:187–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185};
186
187inline void TestRunnerGlobalObject::initialize(JS::Realm& realm)
188{
189 Base::initialize(realm);
190
191 define_direct_property("global"_utf16_fly_string, this, JS::Attribute::Enumerable);
192 define_native_function(realm, "__reportTest__"_utf16, report_test, 2, JS::default_attributes);
193 for (auto& entry : s_exposed_global_functions) {
194 define_native_function(
195 realm,
196 entry.key,
197 [fn = entry.value.function](auto& vm) {
198 return fn(vm);
199 },
200 entry.value.length, JS::default_attributes);
201 }
202}
203
204inline JS_DEFINE_NATIVE_FUNCTION(TestRunnerGlobalObject::report_test)
205{

Callers

nothing calls this directly

Calls 3

initializeFunction · 0.85
define_direct_propertyFunction · 0.85
fnFunction · 0.50

Tested by

no test coverage detected