lightpanda-io / browser

The open-source browser made for headless usage
https://lightpanda.io
GNU Affero General Public License v3.0
152 stars 0 forks source link

Adapt to js_exec changes in zig-js-runtime #253

Closed francisbouvier closed 4 months ago

krichprollsch commented 4 months ago

the wpt tests are failing b/c there is a JS error displayed on stderr that wasn't here before.

In this PR:

$ zig build wpt -- --json tests/wpt/dom/parts/basic-dom-part-objects.tentative.html
:566: Uncaught TypeError: Cannot read properties of undefined (reading 'cloneNode')
[
  {
    "pass": false,
    "crash": false,
    "name": "tests/wpt/dom/parts/basic-dom-part-objects.tentative.html",
    "cases": [
      {
        "pass": false,
        "name": "tests/wpt/dom/parts/basic-dom-part-objects.tentative.html",
        "message": "JSExec"
      }
    ]
  }
]

In main:

$ zig build wpt -- --json tests/wpt/dom/parts/basic-dom-part-objects.tentative.html
[
  {
    "pass": false,
    "crash": false,
    "name": "tests/wpt/dom/parts/basic-dom-part-objects.tentative.html",
    "cases": [
      {
        "pass": false,
        "name": "tests/wpt/dom/parts/basic-dom-part-objects.tentative.html",
        "message": "TypeError: Cannot read properties of undefined (reading 'cloneNode')\n    at <anonymous>:15:42\n    at Array.forEach (<anonymous>)\n    at <anonymous>:7:14"
      }
    ]
  }
]
krichprollsch commented 4 months ago

Fixed

$ zig build wpt -- --safe --json tests/wpt/dom/parts/basic-dom-part-objects.tentative.html
[
  {
    "pass": false,
    "crash": false,
    "name": "tests/wpt/dom/parts/basic-dom-part-objects.tentative.html",
    "cases": [
      {
        "pass": false,
        "name": "tests/wpt/dom/parts/basic-dom-part-objects.tentative.html",
        "message": "TypeError: Cannot read properties of undefined (reading 'cloneNode')\n    at <anonymous>:15:42\n    at Array.forEach (<anonymous>)\n    at <anonymous>:7:14"
      }
    ]
  }
]