Krinkle has submitted this change and it was merged.

Change subject: jquery.textSelection.test: Fix regression in Opera
......................................................................


jquery.textSelection.test: Fix regression in Opera

Removing a window.opera-guarded part of code that was supposed to
"[c]ompensate for Opera's craziness converting \n to \r\n and counting
that as two chars". That craziness was apparently fixed some time ago
and the tests were now failing.

This makes the QUnit tests pass on Opera again.

Bug: 41931
Change-Id: Ide3a95e8e86ee65c8e1ea357aefa44dd2bbd4ed4
---
M tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
1 file changed, 0 insertions(+), 7 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js 
b/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
index ce03b69..5fe2394 100644
--- a/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
@@ -48,13 +48,6 @@
 
                        var start = opt.before.start,
                                end = opt.before.end;
-                       if ( window.opera ) {
-                               // Compensate for Opera's craziness converting 
\n to \r\n and counting that as two chars
-                               var newLinesBefore = opt.before.text.substring( 
0, start ).split( '\n' ).length - 1,
-                                       newLinesInside = 
opt.before.text.substring( start, end ).split( '\n' ).length - 1;
-                               start += newLinesBefore;
-                               end += newLinesBefore + newLinesInside;
-                       }
 
                        var options = $.extend( {}, opt.replace ); // Clone 
opt.replace
                        options.selectionStart = start;

-- 
To view, visit https://gerrit.wikimedia.org/r/55489
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide3a95e8e86ee65c8e1ea357aefa44dd2bbd4ed4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to