aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker/datepicker_options.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_options.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_options.js')
-rw-r--r--tests/unit/datepicker/datepicker_options.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index 7d2b070fa..8b8888780 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -146,7 +146,10 @@ test('otherMonths', function() {
var inp = TestHelpers.datepicker.init('#inp'),
pop = $('#ui-datepicker-div');
inp.val('06/01/2009').datepicker('show');
- equal(pop.find('tbody').text(), '\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0',
+ equal(pop.find('tbody').text(),
+ // support: IE <9, jQuery <1.8
+ // In IE7/8 with jQuery <1.8, encoded spaces behave in strange ways
+ $( "<span>\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0</span>" ).text(),
'Other months - none');
ok(pop.find('td:last *').length === 0, 'Other months - no content');
inp.datepicker('hide').datepicker('option', 'showOtherMonths', true).datepicker('show');
@@ -158,7 +161,10 @@ test('otherMonths', function() {
'Other months - select');
ok(pop.find('td:last a').length === 1, 'Other months - link content');
inp.datepicker('hide').datepicker('option', 'showOtherMonths', false).datepicker('show');
- equal(pop.find('tbody').text(), '\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0',
+ equal(pop.find('tbody').text(),
+ // support: IE <9, jQuery <1.8
+ // In IE7/8 with jQuery <1.8, encoded spaces behave in strange ways
+ $( "<span>\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0</span>" ).text(),
'Other months - none');
ok(pop.find('td:last *').length === 0, 'Other months - no content');
});