summaryrefslogtreecommitdiff
path: root/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-04-25 06:26:49 +0200
committerPierre Schmitz <pierre@archlinux.de>2014-04-25 06:26:49 +0200
commit2e44b49a2db3026050b136de9b00f749dd3ff939 (patch)
treeef048f4db79a93c25cfc86319264aa7ae2a4ae0b /tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
parent9441dde8bfb95277df073717ed7817dced40f948 (diff)
Update to MediaWiki 1.22.6
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.hidpi.test.js')
-rw-r--r--tests/qunit/suites/resources/jquery/jquery.hidpi.test.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js b/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
deleted file mode 100644
index 906369ee..00000000
--- a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
+++ /dev/null
@@ -1,22 +0,0 @@
-( function ( $ ) {
- QUnit.module( 'jquery.hidpi', QUnit.newMwEnvironment() );
-
- QUnit.test( 'devicePixelRatio', 1, function ( assert ) {
- var devicePixelRatio = $.devicePixelRatio();
- assert.equal( typeof devicePixelRatio, 'number', '$.devicePixelRatio() returns a number' );
- } );
-
- QUnit.test( 'matchSrcSet', 6, function ( assert ) {
- var srcset = 'onefive.png 1.5x, two.png 2x';
-
- // Nice exact matches
- assert.equal( $.matchSrcSet( 1, srcset ), null, '1.0 gives no match' );
- assert.equal( $.matchSrcSet( 1.5, srcset ), 'onefive.png', '1.5 gives match' );
- assert.equal( $.matchSrcSet( 2, srcset ), 'two.png', '2 gives match' );
-
- // Non-exact matches; should return the next-biggest specified
- assert.equal( $.matchSrcSet( 1.25, srcset ), null, '1.25 gives no match' );
- assert.equal( $.matchSrcSet( 1.75, srcset ), 'onefive.png', '1.75 gives match to 1.5' );
- assert.equal( $.matchSrcSet( 2.25, srcset ), 'two.png', '2.25 gives match to 2' );
- } );
-}( jQuery ) );