<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[59364] trunk: HTML API: Improve private method name used by `WP_HTML_Processor::next_token()`.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/59364">59364</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/59364","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>westonruter</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-11-06 19:22:22 +0000 (Wed, 06 Nov 2024)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>HTML API: Improve private method name used by `WP_HTML_Processor::next_token()`.

This renames the private `_next_token` method to `next_visitable_token`. It also removes irrelevant assertions from the unit test.

Follow-up to <a href="https://core.trac.wordpress.org/changeset/59285">[59285]</a>.

Props dmsnell, jonsurrell, westonruter.
See <a href="https://core.trac.wordpress.org/ticket/62269">#62269</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludeshtmlapiclasswphtmlprocessorphp">trunk/src/wp-includes/html-api/class-wp-html-processor.php</a></li>
<li><a href="#trunktestsphpunittestshtmlapiwpHtmlProcessorphp">trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunktestsphpunitdatahtmlapitokencountinghtmlprocessorphp">trunk/tests/phpunit/data/html-api/token-counting-html-processor.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunktestsphpunitdatahtmlapihtmlxpathgeneratingprocessorphp">trunk/tests/phpunit/data/html-api/html-xpath-generating-processor.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludeshtmlapiclasswphtmlprocessorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/html-api/class-wp-html-processor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/html-api/class-wp-html-processor.php        2024-11-06 17:58:29 UTC (rev 59363)
+++ trunk/src/wp-includes/html-api/class-wp-html-processor.php  2024-11-06 19:22:22 UTC (rev 59364)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -616,7 +616,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return bool Whether a token was parsed.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function next_token(): bool {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                return $this->_next_token();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         return $this->next_visitable_token();
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -627,13 +627,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * semantic rules for text nodes. For access to the raw tokens consider using
</span><span class="cx" style="display: block; padding: 0 10px">         * WP_HTML_Tag_Processor instead.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @since 6.7.1 Added for internal support; do not use.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * Note that this method may call itself recursively. This is why it is not
+        * implemented as {@see WP_HTML_Processor::next_token()}, which instead calls
+        * this method similarly to how {@see WP_HTML_Tag_Processor::next_token()}
+        * calls the {@see WP_HTML_Tag_Processor::base_class_next_token()} method.
</ins><span class="cx" style="display: block; padding: 0 10px">          *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @since 6.7.1 Added for internal support.
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @access private
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @return bool
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        private function _next_token(): bool {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ private function next_visitable_token(): bool {
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->current_element = null;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( isset( $this->last_error ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -651,7 +656,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 *       tokens works in the meantime and isn't obviously wrong.
</span><span class="cx" style="display: block; padding: 0 10px">                 */
</span><span class="cx" style="display: block; padding: 0 10px">                if ( empty( $this->element_queue ) && $this->step() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        return $this->_next_token();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 return $this->next_visitable_token();
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Process the next event on the queue.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -662,7 +667,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                continue;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        return empty( $this->element_queue ) ? false : $this->_next_token();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 return empty( $this->element_queue ) ? false : $this->next_visitable_token();
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $is_pop = WP_HTML_Stack_Event::POP === $this->current_element->operation;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -673,7 +678,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 * the breadcrumbs.
</span><span class="cx" style="display: block; padding: 0 10px">                 */
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 'root-node' === $this->current_element->token->bookmark_name ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        return $this->_next_token();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 return $this->next_visitable_token();
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Adjust the breadcrumbs for this event.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -685,7 +690,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Avoid sending close events for elements which don't expect a closing.
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $is_pop && ! $this->expects_closer( $this->current_element->token ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        return $this->_next_token();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 return $this->next_visitable_token();
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return true;
</span></span></pre></div>
<a id="trunktestsphpunitdatahtmlapihtmlxpathgeneratingprocessorphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/tests/phpunit/data/html-api/html-xpath-generating-processor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/html-api/html-xpath-generating-processor.php     2024-11-06 17:58:29 UTC (rev 59363)
+++ trunk/tests/phpunit/data/html-api/html-xpath-generating-processor.php       2024-11-06 19:22:22 UTC (rev 59364)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,88 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-class HTML_XPath_Generating_Processor extends WP_HTML_Processor {
-
-       /**
-        * List of tokens that have already been seen.
-        *
-        * @var array<string, int>
-        */
-       public $token_seen_count = array();
-
-       /**
-        * Previous depth.
-        *
-        * @var int
-        */
-       private $previous_depth = 0;
-
-       /**
-        * Open stack indices.
-        *
-        * @since n.e.x.t
-        * @var array<int, array{tag_name: string, index: int}>
-        */
-       private $open_stack_indices = array();
-
-       /**
-        * Gets XPath for the current open tag.
-        *
-        * @return string XPath.
-        */
-       public function get_xpath(): string {
-               $xpath = '';
-               foreach ( $this->open_stack_indices as $level ) {
-                       $xpath .= sprintf( '/*[%d][self::%s]', $level['index'] + 1, $level['tag_name'] );
-               }
-               return $xpath;
-       }
-
-       /**
-        * Gets next token.
-        *
-        * @return bool Whether next token was matched.
-        */
-       public function next_token(): bool {
-               $result        = parent::next_token();
-               $current_depth = $this->get_current_depth();
-               $current_tag   = $this->get_tag();
-
-               $current_depth--; // Because HTML starts at depth 1.
-
-               if ( $this->get_token_type() === '#tag' ) {
-                       $token_name = ( $this->is_tag_closer() ? '-' : '+' ) . $current_tag;
-               } else {
-                       $token_name = $this->get_token_name();
-               }
-
-               if ( ! isset( $this->token_seen_count[ $token_name ] ) ) {
-                       $this->token_seen_count[ $token_name ] = 1;
-               } else {
-                       ++$this->token_seen_count[ $token_name ];
-               }
-
-               if ( $this->get_token_type() === '#tag' && ! $this->is_tag_closer() ) {
-                       if ( $current_depth < $this->previous_depth ) {
-                               array_splice(
-                                       $this->open_stack_indices,
-                                       $current_depth + 1
-                               );
-                       }
-
-                       if ( ! isset( $this->open_stack_indices[ $current_depth ] ) ) {
-                               $this->open_stack_indices[ $current_depth ] = array(
-                                       'tag_name' => $current_tag,
-                                       'index'    => 0,
-                               );
-                       } else {
-                               $this->open_stack_indices[ $current_depth ]['tag_name'] = $current_tag;
-                               ++$this->open_stack_indices[ $current_depth ]['index'];
-                       }
-
-                       $this->previous_depth = $current_depth;
-               }
-
-               return $result;
-       }
-
-}
</del></span></pre></div>
<a id="trunktestsphpunitdatahtmlapitokencountinghtmlprocessorphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/tests/phpunit/data/html-api/token-counting-html-processor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/html-api/token-counting-html-processor.php                               (rev 0)
+++ trunk/tests/phpunit/data/html-api/token-counting-html-processor.php 2024-11-06 19:22:22 UTC (rev 59364)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,35 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+class Token_Counting_HTML_Processor extends WP_HTML_Processor {
+
+       /**
+        * List of tokens that have already been seen.
+        *
+        * @var array<string, int>
+        */
+       public $token_seen_count = array();
+
+       /**
+        * Gets next token.
+        *
+        * @return bool Whether next token was matched.
+        */
+       public function next_token(): bool {
+               $result = parent::next_token();
+
+               if ( $this->get_token_type() === '#tag' ) {
+                       $token_name = ( $this->is_tag_closer() ? '-' : '+' ) . $this->get_tag();
+               } else {
+                       $token_name = $this->get_token_name();
+               }
+
+               if ( ! isset( $this->token_seen_count[ $token_name ] ) ) {
+                       $this->token_seen_count[ $token_name ] = 1;
+               } else {
+                       ++$this->token_seen_count[ $token_name ];
+               }
+
+               return $result;
+       }
+
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: trunk/tests/phpunit/data/html-api/token-counting-html-processor.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="trunktestsphpunittestshtmlapiwpHtmlProcessorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php    2024-11-06 17:58:29 UTC (rev 59363)
+++ trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php      2024-11-06 19:22:22 UTC (rev 59364)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -925,17 +925,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        '-HTML'    => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                        ''         => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected_xpaths'       => array(
-                                       0 => '/*[1][self::HTML]',
-                                       1 => '/*[1][self::HTML]/*[1][self::HEAD]',
-                                       2 => '/*[1][self::HTML]/*[1][self::HEAD]/*[1][self::META]',
-                                       3 => '/*[1][self::HTML]/*[1][self::HEAD]/*[2][self::TITLE]',
-                                       4 => '/*[1][self::HTML]/*[2][self::BODY]',
-                                       5 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::H1]',
-                                       6 => '/*[1][self::HTML]/*[2][self::BODY]/*[2][self::IMG]',
-                                       7 => '/*[1][self::HTML]/*[2][self::BODY]/*[3][self::P]',
-                                       8 => '/*[1][self::HTML]/*[2][self::BODY]/*[4][self::FOOTER]',
-                               ),
</del><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        'multiple_tag_instances'    => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -972,19 +961,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        '-HTML' => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                        ''      => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected_xpaths'       => array(
-                                       0  => '/*[1][self::HTML]',
-                                       1  => '/*[1][self::HTML]/*[1][self::HEAD]',
-                                       2  => '/*[1][self::HTML]/*[2][self::BODY]',
-                                       3  => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::H1]',
-                                       4  => '/*[1][self::HTML]/*[2][self::BODY]/*[2][self::P]',
-                                       5  => '/*[1][self::HTML]/*[2][self::BODY]/*[3][self::P]',
-                                       6  => '/*[1][self::HTML]/*[2][self::BODY]/*[4][self::P]',
-                                       7  => '/*[1][self::HTML]/*[2][self::BODY]/*[5][self::UL]',
-                                       8  => '/*[1][self::HTML]/*[2][self::BODY]/*[5][self::UL]/*[1][self::LI]',
-                                       9  => '/*[1][self::HTML]/*[2][self::BODY]/*[5][self::UL]/*[2][self::LI]',
-                                       10 => '/*[1][self::HTML]/*[2][self::BODY]/*[5][self::UL]/*[3][self::LI]',
-                               ),
</del><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        'extreme_nested_formatting' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1021,18 +997,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        '-HTML'   => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                        ''        => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected_xpaths'       => array(
-                                       0 => '/*[1][self::HTML]',
-                                       1 => '/*[1][self::HTML]/*[1][self::HEAD]',
-                                       2 => '/*[1][self::HTML]/*[2][self::BODY]',
-                                       3 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]',
-                                       4 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]/*[1][self::STRONG]',
-                                       5 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]/*[1][self::STRONG]/*[1][self::EM]',
-                                       6 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]/*[1][self::STRONG]/*[1][self::EM]/*[1][self::STRIKE]',
-                                       7 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]/*[1][self::STRONG]/*[1][self::EM]/*[1][self::STRIKE]/*[1][self::I]',
-                                       8 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]/*[1][self::STRONG]/*[1][self::EM]/*[1][self::STRIKE]/*[1][self::I]/*[1][self::B]',
-                                       9 => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::P]/*[1][self::STRONG]/*[1][self::EM]/*[1][self::STRIKE]/*[1][self::I]/*[1][self::B]/*[1][self::U]',
-                               ),
</del><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1040,22 +1004,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Ensures that subclasses to WP_HTML_Processor can do bookkeeping by extending the next_token() method.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @ticket ?
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @ticket 62269
</ins><span class="cx" style="display: block; padding: 0 10px">          * @dataProvider data_html_processor_with_extended_next_token
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function test_ensure_next_token_method_extensibility( $html, $expected_token_counts, $expected_xpaths ) {
-               require_once DIR_TESTDATA . '/html-api/html-xpath-generating-processor.php';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_ensure_next_token_method_extensibility( $html, $expected_token_counts ) {
+               require_once DIR_TESTDATA . '/html-api/token-counting-html-processor.php';
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $processor     = HTML_XPath_Generating_Processor::create_full_parser( $html );
-               $actual_xpaths = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $processor = Token_Counting_HTML_Processor::create_full_parser( $html );
</ins><span class="cx" style="display: block; padding: 0 10px">                 while ( $processor->next_tag() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( ! $processor->is_tag_closer() ) {
-                               $processor->set_attribute( 'xpath', $processor->get_xpath() );
-                               $actual_xpaths[] = $processor->get_xpath();
-                       }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 continue;
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $expected_token_counts, $processor->token_seen_count, 'Snapshot: ' . var_export( $processor->token_seen_count, true ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $expected_xpaths, $actual_xpaths, 'Snapshot: ' . var_export( $actual_xpaths, true ) );
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>

</body>
</html>