aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorColin Snover <colin@alpha.zetafleet.com>2010-10-09 10:42:01 -0400
committerjeresig <jeresig@gmail.com>2010-10-09 10:42:01 -0400
commit2ca36598954759c5b5dce569a39c52b981ed4ab2 (patch)
tree495e310ac7e5ecbac1caa5fee7247a010cb21dcf /test
parenta2aefbf3b198620ae45d2451d21cc5bf96258a7d (diff)
downloadjquery-2ca36598954759c5b5dce569a39c52b981ed4ab2.tar.gz
jquery-2ca36598954759c5b5dce569a39c52b981ed4ab2.zip
Prevent IE from throwing errors when setting RGBA values. Fixes #5509.
Diffstat (limited to 'test')
-rw-r--r--test/unit/css.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index 468f76386..26dd7047d 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -64,7 +64,7 @@ test("css(String|Hash)", function() {
});
test("css(String, Object)", function() {
- expect(21);
+ expect(22);
ok( jQuery('#nothiddendiv').is(':visible'), 'Modifying CSS display: Assert element is visible');
jQuery('#nothiddendiv').css("display", 'none');
@@ -104,6 +104,16 @@ test("css(String, Object)", function() {
equals( ret, div, "Make sure setting undefined returns the original set." );
equals( div.css("display"), display, "Make sure that the display wasn't changed." );
+
+ // Test for Bug #5509
+ var success = true;
+ try {
+ jQuery('#foo').css("backgroundColor", "rgba(0, 0, 0, 0.1)");
+ }
+ catch (e) {
+ success = false;
+ }
+ ok( success, "Setting RGBA values does not throw Error" );
});
if(jQuery.browser.msie) {