serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb: Implement `document.createCDATASection()`

Open tcl3 opened this issue 1 year ago • 1 comments

This PR adds document.createCDATASection() and includes some fixes to XML document serialization and deserialization, which were necessary to get the createCDATASection test to pass.

This method is used quite extensively by the WPT test harmess, so having it should allow us to run quite a few more WPT tests.

Before: create_cdata_section_before

After: create_cdata_section_after

tcl3 avatar Feb 18 '24 14:02 tcl3

FWIW, I ran all of the WPT DOM tests that use testharness.js with the following command:

/home/tim/repos/serenity/Tests/LibWeb/WPT/wpt/wpt run --webdriver-binary /home/tim/repos/serenity/Build/lagom/bin/WebDriver --log-raw wpt.log ladybird dom --test-types testharness

I got these results:

Before:

Ran 489 tests finished in 2620.4 seconds. • 203 ran as expected. 0 tests skipped. • 14 tests crashed unexpectedly • 56 tests had errors unexpectedly • 66 tests timed out unexpectedly • 165 tests had unexpected subtest results

After:

Ran 489 tests finished in 2601.8 seconds. • 208 ran as expected. 0 tests skipped. • 14 tests crashed unexpectedly • 56 tests had errors unexpectedly • 65 tests timed out unexpectedly • 160 tests had unexpected subtest results

tcl3 avatar Feb 18 '24 23:02 tcl3

Excellent!

awesomekling avatar Feb 19 '24 09:02 awesomekling