summaryrefslogtreecommitdiff
path: root/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.textSelection.test.js')
-rw-r--r--tests/qunit/suites/resources/jquery/jquery.textSelection.test.js33
1 files changed, 16 insertions, 17 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js b/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
index 56b0fa92..2e6f05ed 100644
--- a/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
@@ -5,13 +5,13 @@
/**
* Test factory for $.fn.textSelection( 'encapsulateText' )
*
- * @param options {object} associative array containing:
- * description {string}
- * input {string}
- * output {string}
- * start {int} starting char for selection
- * end {int} ending char for selection
- * params {object} add'l parameters for $().textSelection( 'encapsulateText' )
+ * @param {Object} options Associative configuration array
+ * @param {string} options.description Description
+ * @param {string} options.input Input
+ * @param {string} options.output Output
+ * @param {int} options.start Starting char for selection
+ * @param {int} options.end Ending char for selection
+ * @param {object} options.params Additional parameters for $().textSelection( 'encapsulateText' )
*/
function encapsulateTest( options ) {
var opt = $.extend( {
@@ -237,23 +237,22 @@
}
pos = $textarea.textSelection( 'getCaretPosition', { startAndEnd: true } );
- among( pos[0], options.start, 'Caret start should be where we set it.' );
- among( pos[1], options.end, 'Caret end should be where we set it.' );
+ among( pos[ 0 ], options.start, 'Caret start should be where we set it.' );
+ among( pos[ 1 ], options.end, 'Caret end should be where we set it.' );
} );
}
caretSample = 'Some big text that we like to work with. Nothing fancy... you know what I mean?';
-/*
- // @broken: Disabled per bug 34820
+ /* @broken: Disabled per bug 34820
caretTest({
- description: 'getCaretPosition with original/empty selection - bug 31847 with IE 6/7/8',
- text: caretSample,
- start: [0, caretSample.length], // Opera and Firefox (prior to FF 6.0) default caret to the end of the box (caretSample.length)
- end: [0, caretSample.length], // Other browsers default it to the beginning (0), so check both.
- mode: 'get'
+ description: 'getCaretPosition with original/empty selection - bug 31847 with IE 6/7/8',
+ text: caretSample,
+ start: [0, caretSample.length], // Opera and Firefox (prior to FF 6.0) default caret to the end of the box (caretSample.length)
+ end: [0, caretSample.length], // Other browsers default it to the beginning (0), so check both.
+ mode: 'get'
});
-*/
+ */
caretTest( {
description: 'set/getCaretPosition with forced empty selection',