summaryrefslogtreecommitdiff
path: root/tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-03-12 18:12:23 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-03-12 18:12:23 +0100
commitd417de70fcf39e0a7a15ba780b597914d16ca0f7 (patch)
tree06ef8c333473660350b995abc03e18f3f85359eb /tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js
parenta4edbfa031eb4cd72678051f1510afde4f77951e (diff)
Update to MediaWiki 1.22.4
Diffstat (limited to 'tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js')
-rw-r--r--tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js70
1 files changed, 0 insertions, 70 deletions
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js
deleted file mode 100644
index 3328ce3f..00000000
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Some misc JavaScript compatibility tests,
- * just to make sure the environments we run in are consistent.
- */
-( function ( $ ) {
- QUnit.module( 'mediawiki.jscompat', QUnit.newMwEnvironment() );
-
- QUnit.test( 'Variable with Unicode letter in name', 3, function ( assert ) {
- var orig, ŝablono;
-
- orig = 'some token';
- ŝablono = orig;
-
- assert.deepEqual( ŝablono, orig, 'ŝablono' );
- assert.deepEqual( \u015dablono, orig, '\\u015dablono' );
- assert.deepEqual( \u015Dablono, orig, '\\u015Dablono' );
- } );
-
- /*
- // Not that we need this. ;)
- // This fails on IE 6-8
- // Works on IE 9, Firefox 6, Chrome 14
- QUnit.test( 'Keyword workaround: "if" as variable name using Unicode escapes', function ( assert ) {
- var orig = "another token";
- \u0069\u0066 = orig;
- assert.deepEqual( \u0069\u0066, orig, '\\u0069\\u0066' );
- });
- */
-
- /*
- // Not that we need this. ;)
- // This fails on IE 6-9
- // Works on Firefox 6, Chrome 14
- QUnit.test( 'Keyword workaround: "if" as member variable name using Unicode escapes', function ( assert ) {
- var orig = "another token";
- var foo = {};
- foo.\u0069\u0066 = orig;
- assert.deepEqual( foo.\u0069\u0066, orig, 'foo.\\u0069\\u0066' );
- });
- */
-
- QUnit.test( 'Stripping of single initial newline from textarea\'s literal contents (bug 12130)', function ( assert ) {
- var maxn, n,
- expected, $textarea;
-
- maxn = 4;
- QUnit.expect( maxn * 2 );
-
- function repeat( str, n ) {
- var out;
- if ( n <= 0 ) {
- return '';
- } else {
- out = [];
- out.length = n + 1;
- return out.join( str );
- }
- }
-
- for ( n = 0; n < maxn; n++ ) {
- expected = repeat( '\n', n ) + 'some text';
-
- $textarea = $( '<textarea>\n' + expected + '</textarea>' );
- assert.equal( $textarea.val(), expected, 'Expecting ' + n + ' newlines (HTML contained ' + (n + 1) + ')' );
-
- $textarea = $( '<textarea>' ).val( expected );
- assert.equal( $textarea.val(), expected, 'Expecting ' + n + ' newlines (from DOM set with ' + n + ')' );
- }
- } );
-}( jQuery ) );