Remove dead code

The MobileDiff page no longer exists, and was replaced with a redirect
that redirects to the desktop diff page, so this code can safely
be removed.

Bug: T360389
Change-Id: I8ebe2bc88a650caf29a5755013e980fe3b5aaeb0
这个提交包含在:
Jon Robson 2024-04-18 11:44:04 -07:00 提交者 Jdlrobson
父节点 e482005b2e
当前提交 b1d8a16d2d
共有 2 个文件被更改,包括 0 次插入28 次删除

查看文件

@ -45,12 +45,6 @@ class RevisionSliderHooks implements DifferenceEngineViewHeaderHook, GetPreferen
$oldRevRecord = $differenceEngine->getOldRevision();
$newRevRecord = $differenceEngine->getNewRevision();
// do not show on MobileDiff page
// Note: Since T245172, DifferenceEngine::getTitle() is the title of the page being diffed.
if ( $differenceEngine->getOutput()->getTitle()->isSpecial( 'MobileDiff' ) ) {
return;
}
/**
* If the user is logged in and has explictly requested to disable the extension don't load.
*/

查看文件

@ -30,28 +30,6 @@ class RevisionSliderHooksTest extends \MediaWikiIntegrationTestCase {
$this->newInstance()->onDifferenceEngineViewHeader( $diffEngine );
}
public function testShouldNotLoadOnMobileDiff() {
// Arrange
$title = $this->createMock( Title::class );
$title->method( 'isSpecial' )
->with( 'MobileDiff' )
->willReturn( true );
$output = $this->createMock( OutputPage::class );
$output->method( 'getTitle' )
->willReturn( $title );
$revision = $this->createMock( RevisionRecord::class );
$diffEngine = $this->newDiffEngine( $revision, $output );
// Assert
$output->expects( $this->never() )
->method( 'addModules' );
// Act
$this->newInstance()->onDifferenceEngineViewHeader( $diffEngine );
}
public function testShouldNotLoadWhenUserIsLoggedInAndDisabledExtension() {
// Arrange
$options = [ 'revisionslider-disable' => true ];