@@ -348,6 +348,8 @@ public function data_html_target_with_breadcrumbs() {
348348 array ( 'HTML ' , 'BODY ' , 'DIV ' , 'DIV ' , 'DIV ' , 'DIV ' , 'DIV ' , 'DIV ' , 'DIV ' , 'DIV ' , 'DIV ' , 'STRONG ' , 'EM ' , 'CODE ' ),
349349 2 ,
350350 ),
351+ 'EM inside H3 after unclosed P ' => array ( '<p><h3><em target>Important Message</em></h3> ' , array ( 'HTML ' , 'BODY ' , 'H3 ' , 'EM ' ), 1 ),
352+ 'H4 after H2 ' => array ( '<h2>Major</h2><h4 target>Minor</h4> ' , array ( 'HTML ' , 'BODY ' , 'H4 ' ), 1 ),
351353 );
352354 }
353355
@@ -383,29 +385,29 @@ public function test_reports_if_tag_matches_breadcrumbs_of_various_specificity(
383385 public function data_html_with_breadcrumbs_of_various_specificity () {
384386 return array (
385387 // Test with void elements.
386- 'Inner IMG ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'span ' , 'figure ' , 'img ' ), true ),
387- 'Inner IMG wildcard ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'span ' , '* ' , 'img ' ), true ),
388- 'Inner IMG no wildcard ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'span ' , 'img ' ), false ),
389- 'Full specification ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'html ' , 'body ' , 'div ' , 'span ' , 'figure ' , 'img ' ), true ),
390- 'Invalid Full specification ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'html ' , 'div ' , 'span ' , 'figure ' , 'img ' ), false ),
388+ 'Inner IMG ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'span ' , 'figure ' , 'img ' ), true ),
389+ 'Inner IMG wildcard ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'span ' , '* ' , 'img ' ), true ),
390+ 'Inner IMG no wildcard ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'span ' , 'img ' ), false ),
391+ 'Full specification ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'html ' , 'body ' , 'div ' , 'span ' , 'figure ' , 'img ' ), true ),
392+ 'Invalid Full specification ' => array ( '<div><span><figure><img target></figure></span></div> ' , array ( 'html ' , 'div ' , 'span ' , 'figure ' , 'img ' ), false ),
391393
392394 // Test also with non-void elements that open and close.
393- 'Inner P ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'span ' , 'figure ' , 'p ' ), true ),
394- 'Inner P wildcard ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'span ' , '* ' , 'p ' ), true ),
395- 'Inner P no wildcard ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'span ' , 'p ' ), false ),
396- 'Full specification (P) ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'html ' , 'body ' , 'div ' , 'span ' , 'figure ' , 'p ' ), true ),
397- 'Invalid Full specification (P) ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'html ' , 'div ' , 'span ' , 'figure ' , 'p ' ), false ),
395+ 'Inner P ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'span ' , 'figure ' , 'p ' ), true ),
396+ 'Inner P wildcard ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'span ' , '* ' , 'p ' ), true ),
397+ 'Inner P no wildcard ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'span ' , 'p ' ), false ),
398+ 'Full specification (P) ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'html ' , 'body ' , 'div ' , 'span ' , 'figure ' , 'p ' ), true ),
399+ 'Invalid Full specification (P) ' => array ( '<div><span><figure><p target></figure></span></div> ' , array ( 'html ' , 'div ' , 'span ' , 'figure ' , 'p ' ), false ),
398400
399401 // Ensure that matches aren't on tag closers.
400- 'Inner P ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'span ' , 'figure ' , 'p ' ), false ),
401- 'Inner P wildcard ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'span ' , '* ' , 'p ' ), false ),
402- 'Inner P no wildcard ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'span ' , 'p ' ), false ),
403- 'Full specification (P) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'html ' , 'body ' , 'div ' , 'span ' , 'figure ' , 'p ' ), false ),
404- 'Invalid Full specification (P) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'html ' , 'div ' , 'span ' , 'figure ' , 'p ' ), false ),
402+ 'Inner P (Closer) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'span ' , 'figure ' , 'p ' ), false ),
403+ 'Inner P wildcard (Closer) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'span ' , '* ' , 'p ' ), false ),
404+ 'Inner P no wildcard (Closer) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'span ' , 'p ' ), false ),
405+ 'Full specification (P) (Closer) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'html ' , 'body ' , 'div ' , 'span ' , 'figure ' , 'p ' ), false ),
406+ 'Invalid Full specification (P) (Closer) ' => array ( '<div><span><figure></p target></figure></span></div> ' , array ( 'html ' , 'div ' , 'span ' , 'figure ' , 'p ' ), false ),
405407
406408 // Test wildcard behaviors.
407- 'Single wildcard element ' => array ( '<figure><code><div><p><span><img target></span></p></div></code></figure> ' , array ( '* ' ), true ),
408- 'Child of wildcard element ' => array ( '<figure><code><div><p><span><img target></span></p></div></code></figure> ' , array ( 'SPAN ' , '* ' ), true ),
409+ 'Single wildcard element ' => array ( '<figure><code><div><p><span><img target></span></p></div></code></figure> ' , array ( '* ' ), true ),
410+ 'Child of wildcard element ' => array ( '<figure><code><div><p><span><img target></span></p></div></code></figure> ' , array ( 'SPAN ' , '* ' ), true ),
409411 );
410412 }
411413
0 commit comments