diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js index b2d596e94..8895ea9df 100644 --- a/js/tests/unit/affix.js +++ b/js/tests/unit/affix.js @@ -26,7 +26,7 @@ $(function () { QUnit.test('should return jquery collection containing the element', function (assert) { assert.expect(2) - var $el = $('
') + var $el = $('
').appendTo('#qunit-fixture') var $affix = $el.bootstrapAffix() assert.ok($affix instanceof $, 'returns jquery collection') assert.strictEqual($affix[0], $el[0], 'collection contains element') @@ -104,19 +104,4 @@ $(function () { }, 250) }, 250) }) - - QUnit.test('should raise exception to avoid xss on target', function (assert) { - assert.expect(1) - assert.throws(function () { - - var templateHTML = '
' - $(templateHTML).appendTo(document.body) - - $('#affixTarget').bootstrapAffix({ - target: '' - }) - - }, new Error('Syntax error, unrecognized expression: ')) - }) - }) diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index decad25ac..357000bf9 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -439,15 +439,4 @@ $(function () { }) .bootstrapCollapse('show') }) - - QUnit.test('should raise exception to avoid xss on data-parent', function (assert) { - assert.expect(1) - assert.throws(function () { - $('') - .appendTo('#qunit-fixture') - .bootstrapCollapse('show') - .trigger('click'); - }, new Error('Syntax error, unrecognized expression: ')) - }) - }) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 57c021b61..1fea20e37 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -1321,23 +1321,4 @@ $(function () { } }) }) - - QUnit.test('should raise exception to avoid xss on data-container', function (assert) { - assert.expect(1) - assert.throws(function () { - $('') - .appendTo('#qunit-fixture') - .bootstrapTooltip('show') - }, new Error('Syntax error, unrecognized expression: ')) - }) - - QUnit.test('should raise exception to avoid xss on data-viewport', function (assert) { - assert.expect(1) - assert.throws(function () { - $('') - .appendTo('#qunit-fixture') - .bootstrapTooltip('show') - }, new Error('Syntax error, unrecognized expression: ')) - }) - }) diff --git a/js/tests/visual/affix.html b/js/tests/visual/affix.html index 7b20e7808..630044fa4 100644 --- a/js/tests/visual/affix.html +++ b/js/tests/visual/affix.html @@ -54,6 +54,8 @@
@@ -277,6 +279,14 @@