Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
Fixed testsuite for Firefox.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Kalnitsky committed Oct 13, 2013
1 parent 76f0732 commit 34cf060
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions testsuite/multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
* @license BSD
*/

module('MultiSelectListbox');
module('MultiSelectListbox', {
setup: function () {
$('#test').attr('multiple', '');
}
});


function _itemsToVal(items) {
Expand All @@ -20,9 +24,7 @@ function _itemsToVal(items) {


test('construct default', function () {
var select = $('#test')
.attr('multiple', '').listbox()
;
var select = $('#test').listbox();

var listbox = select.next();
equal(listbox.attr('class'), 'lbjs');
Expand All @@ -36,9 +38,7 @@ test('construct default', function () {


test('construct with searchbar', function () {
var select = $('#test')
.attr('multiple', '').listbox({'searchbar': true})
;
var select = $('#test').listbox({'searchbar': true});

var listbox = select.next();
var searchbar = listbox.find('.lbjs-searchbar');
Expand All @@ -48,9 +48,7 @@ test('construct with searchbar', function () {


test('construct with class', function () {
var select = $('#test')
.attr('multiple', '').listbox({'class': 'testClass'})
;
var select = $('#test').listbox({'class': 'testClass'});

var listbox = select.next();
equal(listbox.attr('class'), 'lbjs testClass');
Expand All @@ -62,8 +60,7 @@ test('implicit default value', function () {
.append('<option>A</option>')
.append('<option>B</option>')
.append('<option>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand All @@ -78,8 +75,7 @@ test('explicit default value', function () {
.append('<option >A</option>')
.append('<option selected>B</option>')
.append('<option >C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand All @@ -96,8 +92,7 @@ test('two explicit default values', function () {
.append('<option >A</option>')
.append('<option selected>B</option>')
.append('<option selected>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand All @@ -114,8 +109,7 @@ test('one click', function () {
.append('<option>A</option>')
.append('<option>B</option>')
.append('<option>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand All @@ -135,8 +129,7 @@ test('two clicks', function () {
.append('<option>A</option>')
.append('<option>B</option>')
.append('<option>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand All @@ -156,8 +149,7 @@ test('two clicks on different items', function () {
.append('<option>A</option>')
.append('<option>B</option>')
.append('<option>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand All @@ -178,8 +170,7 @@ test('multiple clicks', function () {
.append('<option>A</option>')
.append('<option>B</option>')
.append('<option>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var list = select.next().find('.lbjs-list');
Expand Down Expand Up @@ -255,8 +246,7 @@ test('change event', function () {
.append('<option>A</option>')
.append('<option>B</option>')
.append('<option>C</option>')

.attr('multiple', '').listbox()
.listbox()
;

var receiveCounter = 0;
Expand Down

0 comments on commit 34cf060

Please sign in to comment.