| 185 | }; |
| 186 | |
| 187 | inline 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 | |
| 204 | inline JS_DEFINE_NATIVE_FUNCTION(TestRunnerGlobalObject::report_test) |
| 205 | { |
nothing calls this directly
no test coverage detected