Jdlrobson has submitted this change and it was merged.
Change subject: Rm DeviceDetection::supportsJQuery()
......................................................................
Rm DeviceDetection::supportsJQuery()
We now rely on ResourceLoader to decide on this
Change-Id: Ia4b2fed70fdff86bd33a04e702a4f18fc10f3b01
---
M includes/DeviceDetection.php
M tests/DeviceDetectionTest.php
2 files changed, 0 insertions(+), 54 deletions(-)
Approvals:
Jdlrobson: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/includes/DeviceDetection.php b/includes/DeviceDetection.php
index 48c32d7..9a495fb 100644
--- a/includes/DeviceDetection.php
+++ b/includes/DeviceDetection.php
@@ -35,11 +35,6 @@
/**
* @return bool
*/
- function supportsJQuery();
-
- /**
- * @return bool
- */
function isMobileDevice();
/**
@@ -93,13 +88,6 @@
*/
public function format() {
return $this->device['view_format'];
- }
-
- /**
- * @return bool
- */
- public function supportsJQuery() {
- return $this->device['supports_jquery'];
}
/**
@@ -219,102 +207,82 @@
'android' => array (
'view_format' => 'html',
'css_file_name' => '',
- 'supports_jquery' => true,
),
'blackberry' => array (
'view_format' => 'html',
'css_file_name' => 'blackberry',
- 'supports_jquery' => false,
),
'blackberry-lt5' => array (
'view_format' => 'html',
'css_file_name' => 'blackberry',
- 'supports_jquery' => false,
),
'capable' => array (
'view_format' => 'html',
'css_file_name' => '',
- 'supports_jquery' => true,
),
'html' => array (
'view_format' => 'html',
'css_file_name' => '',
- 'supports_jquery' => false,
),
'ie' => array (
'view_format' => 'html',
'css_file_name' => 'ie',
- 'supports_jquery' => true,
),
'iphone' => array (
'view_format' => 'html',
'css_file_name' => 'iphone',
- 'supports_jquery' => true,
),
'kindle' => array (
'view_format' => 'html',
'css_file_name' => 'kindle',
- 'supports_jquery' => false,
),
'kindle2' => array (
'view_format' => 'html',
'css_file_name' => 'kindle',
- 'supports_jquery' => false,
),
'netfront' => array (
'view_format' => 'html',
'css_file_name' => 'simple',
- 'supports_jquery' => false,
),
'nokia' => array (
'view_format' => 'html',
'css_file_name' => 'nokia',
- 'supports_jquery' => false,
),
'operamini' => array (
'view_format' => 'html',
'css_file_name' => 'operamini',
- 'supports_jquery' => false,
),
'operamobile' => array (
'view_format' => 'html',
'css_file_name' => 'operamobile',
- 'supports_jquery' => true,
),
'palm_pre' => array (
'view_format' => 'html',
'css_file_name' => '',
- 'supports_jquery' => false,
),
'ps3' => array (
'view_format' => 'html',
'css_file_name' => 'simple',
- 'supports_jquery' => false,
),
'psp' => array (
'view_format' => 'html',
'css_file_name' => 'psp',
- 'supports_jquery' => false,
),
'wap2' => array (
'view_format' => 'html',
'css_file_name' => 'simple',
- 'supports_jquery' => false,
),
'webkit' => array (
'view_format' => 'html',
'css_file_name' => '',
- 'supports_jquery' => true,
),
'wii' => array (
'view_format' => 'html',
'css_file_name' => 'wii',
- 'supports_jquery' => true,
),
'wml' => array (
'view_format' => 'wml',
'css_file_name' => '',
- 'supports_jquery' => false,
),
);
@@ -355,7 +323,6 @@
return new DeviceProperties( array(
'view_format' => 'html',
'css_file_name' => '',
- 'supports_jquery' => true,
), $userAgent );
}
}
diff --git a/tests/DeviceDetectionTest.php b/tests/DeviceDetectionTest.php
index c95e10c..412df45 100644
--- a/tests/DeviceDetectionTest.php
+++ b/tests/DeviceDetectionTest.php
@@ -54,27 +54,6 @@
}
/**
- * @dataProvider provideTestDeviceCapabilities
- */
- public function testDeviceCapabilities( $format, $jquery ) {
- $detector = new DeviceDetection();
- $device = $detector->getDeviceProperties( $format, '' );
- $this->assertEquals( $device->supportsJQuery(), $jquery );
- }
-
- public function provideTestDeviceCapabilities() {
- return array(
- array( 'webkit', true ),
- array( 'capable', true ),
- array( 'ie', true ),
- array( 'nokia', false ),
- array( 'blackberry', false ),
- array( 'blackberry-lt5', false ),
- array( 'html', false ),
- );
- }
-
- /**
* @dataProvider provideTestModuleName
*/
public function testModuleName( $format, $moduleName ) {
--
To view, visit https://gerrit.wikimedia.org/r/61934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4b2fed70fdff86bd33a04e702a4f18fc10f3b01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits