mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 08:48:58 +00:00
Adopt global Types changes in jsruntime
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -29,16 +29,14 @@ const Out = enum {
|
||||
text,
|
||||
};
|
||||
|
||||
pub const Types = jsruntime.reflect(DOM.Interfaces);
|
||||
|
||||
// TODO For now the WPT tests run is specific to WPT.
|
||||
// It manually load js framwork libs, and run the first script w/ js content in
|
||||
// the HTML page.
|
||||
// Once browsercore will have the html loader, it would be useful to refacto
|
||||
// this test to use it.
|
||||
pub fn main() !void {
|
||||
|
||||
// generate APIs
|
||||
const apis = comptime jsruntime.compile(DOM.Interfaces);
|
||||
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
defer _ = gpa.deinit();
|
||||
const alloc = gpa.allocator();
|
||||
@@ -123,7 +121,7 @@ pub fn main() !void {
|
||||
var arena = std.heap.ArenaAllocator.init(alloc);
|
||||
defer arena.deinit();
|
||||
|
||||
const res = wpt.run(&arena, apis, wpt_dir, tc, &loader) catch |err| {
|
||||
const res = wpt.run(&arena, wpt_dir, tc, &loader) catch |err| {
|
||||
const suite = try Suite.init(alloc, tc, false, @errorName(err), null);
|
||||
try results.append(suite);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user