Get rid of rtTestMode

Back in the early days of Parsoid, we introduced rtTestMode so
we can suppress lots of noisy (but harmless) diffs in rt-testing
so we can isolate the harmful diffs that absolutely needed fixing.
This mode was critical to running large scale round-trip testing on
a large test corpus and let us get a lot of confidence in Parsoid's
ability to handle VisualEditors edits.

But, now that Parsoid is established and selective serialization is
also fairly robust, it is time to get rid of this mode altogether.
This mode was adding clutter to the codebase and was potentially confusing
in some cases. We won't lose our ability to identify regressions in
rt-testing since all we care about is semantic diff changes relative
to a baseline. We just end up with a lower-fidelity baseline.

Change-Id: I22a1b3ecf4e0224000f1df6a98cf7ea9bcb4ee4e
This commit is contained in:
Subramanya Sastry 2021-01-11 12:42:04 -06:00
parent 9679519b0a
commit 6ebe050750

View file

@ -713,8 +713,7 @@ class References extends ExtensionTagHandler {
ParsoidExtensionAPI $extApi, DOMElement $node, bool $wrapperUnmodified
) {
$dataMw = DOMDataUtils::getDataMw( $node );
if ( !empty( $dataMw->autoGenerated ) && ( ( $dataMw->attrs->group ?? '' ) !== ''
|| $extApi->rtTestMode() ) ) {
if ( !empty( $dataMw->autoGenerated ) && ( $dataMw->attrs->group ?? '' ) !== '' ) {
// Eliminate auto-inserted <references /> noise in rt-testing
return '';
} else {