From 14f74d141ab5580688bfd46d2f74c026e43ed967 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 1 Apr 2015 06:11:44 +0200 Subject: Update to MediaWiki 1.24.2 --- .../qunit/suites/resources/jquery/jquery.color.test.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/qunit/suites/resources/jquery/jquery.color.test.js (limited to 'tests/qunit/suites/resources/jquery/jquery.color.test.js') diff --git a/tests/qunit/suites/resources/jquery/jquery.color.test.js b/tests/qunit/suites/resources/jquery/jquery.color.test.js new file mode 100644 index 00000000..c8e8ac70 --- /dev/null +++ b/tests/qunit/suites/resources/jquery/jquery.color.test.js @@ -0,0 +1,18 @@ +( function ( $ ) { + QUnit.module( 'jquery.color', QUnit.newMwEnvironment( { + setup: function () { + this.clock = this.sandbox.useFakeTimers(); + } + } ) ); + + QUnit.test( 'animate', 1, function ( assert ) { + var $canvas = $( '
' ).css( 'background-color', '#fff' ); + + $canvas.animate( { backgroundColor: '#000' }, 10 ).promise().then( function () { + var endColors = $.colorUtil.getRGB( $canvas.css( 'background-color' ) ); + assert.deepEqual( endColors, [0, 0, 0], 'end state' ); + } ); + + this.clock.tick( 20 ); + } ); +}( jQuery ) ); -- cgit v1.2.3-54-g00ecf