@@ -27,20 +27,17 @@ class Tests_HtmlApi_Html5lib extends WP_UnitTestCase {
2727 * Skip specific tests that may not be supported or have known issues.
2828 */
2929 const SKIP_TESTS = array (
30- 'comments01/line0155 ' => 'Unimplemented: Need to access raw comment text on non-normative comments. ' ,
31- 'comments01/line0169 ' => 'Unimplemented: Need to access raw comment text on non-normative comments. ' ,
32- 'html5test-com/line0129 ' => 'Unimplemented: Need to access raw comment text on non-normative comments. ' ,
33- 'noscript01/line0014 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
34- 'tests14/line0022 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
35- 'tests14/line0055 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
36- 'tests19/line0488 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
37- 'tests19/line0500 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
38- 'tests19/line1079 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
39- 'tests2/line0207 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
40- 'tests2/line0686 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
41- 'tests2/line0697 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
42- 'tests2/line0709 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
43- 'webkit01/line0231 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
30+ 'noscript01/line0014 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
31+ 'tests14/line0022 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
32+ 'tests14/line0055 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
33+ 'tests19/line0488 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
34+ 'tests19/line0500 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
35+ 'tests19/line1079 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
36+ 'tests2/line0207 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
37+ 'tests2/line0686 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
38+ 'tests2/line0697 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
39+ 'tests2/line0709 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
40+ 'webkit01/line0231 ' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags. ' ,
4441 );
4542
4643 /**
@@ -315,26 +312,8 @@ static function ( $a, $b ) {
315312 break ;
316313
317314 case '#comment ' :
318- switch ( $ processor ->get_comment_type () ) {
319- case WP_HTML_Processor::COMMENT_AS_ABRUPTLY_CLOSED_COMMENT :
320- case WP_HTML_Processor::COMMENT_AS_HTML_COMMENT :
321- case WP_HTML_Processor::COMMENT_AS_INVALID_HTML :
322- $ comment_text_content = $ processor ->get_modifiable_text ();
323- break ;
324-
325- case WP_HTML_Processor::COMMENT_AS_CDATA_LOOKALIKE :
326- $ comment_text_content = "[CDATA[ {$ processor ->get_modifiable_text ()}]] " ;
327- break ;
328-
329- case WP_HTML_Processor::COMMENT_AS_PI_NODE_LOOKALIKE :
330- $ comment_text_content = "? {$ processor ->get_tag ()}{$ processor ->get_modifiable_text ()}? " ;
331- break ;
332-
333- default :
334- throw new Error ( "Unhandled comment type for tree construction: {$ processor ->get_comment_type ()}" );
335- }
336315 // Comments must be "<" then "!-- " then the data then " -->".
337- $ output .= str_repeat ( self ::TREE_INDENT , $ indent_level ) . "<!-- {$ comment_text_content } --> \n" ;
316+ $ output .= str_repeat ( self ::TREE_INDENT , $ indent_level ) . "<!-- {$ processor -> get_full_comment_text () } --> \n" ;
338317 break ;
339318
340319 default :
0 commit comments