Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 30 additions & 22 deletions tests/phpunit/tests/html-api/wpHtmlProcessorWebPlatformTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@ class Tests_HtmlApi_WebPlatformTests extends WP_UnitTestCase {
* Skip specific tests that may not be supported or have known issues.
*/
const SKIP_TESTS = array(
'noscript01/line0014' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests14/line0022' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests14/line0055' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests19/line0488' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests19/line0500' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests19/line1079' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0207' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0686' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0697' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0709' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'webkit01/line0231' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'webkit02/line0692' => 'Unimplemented: The parser does not implement the "maybe clone an option into selectedcontent" algorithm.',
'webkit02/line0732' => 'Unimplemented: The parser does not implement the "maybe clone an option into selectedcontent" algorithm.',
'webkit02/line0748' => 'Unimplemented: The parser does not implement the "maybe clone an option into selectedcontent" algorithm.',
'noscript01/line0014' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests14/line0022' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests14/line0055' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests19/line0488' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests19/line0500' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests19/line1079' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0207' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0686' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0697' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'tests2/line0709' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'webkit01/line0231' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.',
'webkit02/line0692' => 'Unimplemented: The parser does not implement the "maybe clone an option into selectedcontent" algorithm.',
'webkit02/line0732' => 'Unimplemented: The parser does not implement the "maybe clone an option into selectedcontent" algorithm.',
'webkit02/line0748' => 'Unimplemented: The parser does not implement the "maybe clone an option into selectedcontent" algorithm.',
'processing-instructions/line0999' => 'Temporarily disabled invalid test.',
);

/**
Expand Down Expand Up @@ -463,13 +464,20 @@ public static function parse_web_platform_test_file( $filename ) {

fclose( $handle );

// Return the last result when reaching the end of the file.
return array(
$test_line_number,
$test_context_element,
// Remove the trailing newline
substr( $test_html, 0, -1 ),
$test_dom,
);
// Yield the last result when reaching the end of the file.
if ( $state && ! $test_script_flag ) {
// Other tests include the blank line separating them from the next test.
if ( ! str_ends_with( $test_dom, "\n\n" ) ) {
$test_dom .= "\n";
}

yield array(
$test_line_number,
$test_context_element,
// Remove the trailing newline
substr( $test_html, 0, -1 ),
$test_dom,
);
}
}
}
Loading