aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker/datepicker_events.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-15 18:57:44 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-15 18:57:44 -0500
commitccdceddd804458ed451b11660c161ef3cf8de5cd (patch)
tree88cf4f0163b2c1a50f5b387cf2eac55326f7fd43 /tests/unit/datepicker/datepicker_events.js
parent8c36603305bba105d03fe611c33e8ae5973b072b (diff)
downloadjquery-ui-ccdceddd804458ed451b11660c161ef3cf8de5cd.tar.gz
jquery-ui-ccdceddd804458ed451b11660c161ef3cf8de5cd.zip
Datepicker tests: Work around encoding issues in oldIE.
Diffstat (limited to 'tests/unit/datepicker/datepicker_events.js')
-rw-r--r--tests/unit/datepicker/datepicker_events.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/unit/datepicker/datepicker_events.js b/tests/unit/datepicker/datepicker_events.js
index 5e8a35e0d..43b0a4b23 100644
--- a/tests/unit/datepicker/datepicker_events.js
+++ b/tests/unit/datepicker/datepicker_events.js
@@ -132,16 +132,21 @@ test('beforeShowDay-getDate', function() {
dp = $('#ui-datepicker-div');
inp.val('01/01/2010').datepicker('show');
// contains non-breaking space
- equal($('div.ui-datepicker-title').text(), 'January 2010', 'Initial month');
+ equal($('div.ui-datepicker-title').text(),
+ // support: IE <9, jQuery <1.8
+ // In IE7/8 with jQuery <1.8, encoded spaces behave in strange ways
+ $( "<span>January&#xa0;2010</span>" ).text(), 'Initial month');
$('a.ui-datepicker-next', dp).click();
$('a.ui-datepicker-next', dp).click();
// contains non-breaking space
- equal($('div.ui-datepicker-title').text(), 'March 2010', 'After next clicks');
+ equal($('div.ui-datepicker-title').text(),
+ $( "<span>March&#xa0;2010</span>" ).text(), 'After next clicks');
inp.datepicker('hide').datepicker('show');
$('a.ui-datepicker-prev', dp).click();
$('a.ui-datepicker-prev', dp).click();
// contains non-breaking space
- equal($('div.ui-datepicker-title').text(), 'November 2009', 'After prev clicks');
+ equal($('div.ui-datepicker-title').text(),
+ $( "<span>November&#xa0;2009</span>" ).text(), 'After prev clicks');
inp.datepicker('hide');
});