Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/165152

Change subject: Element: Remove test for deprecated onDOMEvent()
......................................................................

Element: Remove test for deprecated onDOMEvent()

The onDOMEvent() method is a transparent proxy for jQuery#on.
It doesn't provide any logic that is in need of testing.

Due to the test being very specific, it actually fails on Firefox.
(On Firefox the iframe receives a focusin event even after we
detach it from the document, so the assertion fails.)

Change-Id: I89920e7d6da234ec1af2cdbb86558c640ebcae4b
---
M tests/Element.test.js
1 file changed, 0 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/52/165152/1

diff --git a/tests/Element.test.js b/tests/Element.test.js
index 52d56ee..83d31da 100644
--- a/tests/Element.test.js
+++ b/tests/Element.test.js
@@ -29,38 +29,3 @@
 
        assert.strictEqual( OO.ui.Element.getDocument( {} ), null, 'Invalid' );
 } );
-
-QUnit.test( 'onDOMEvent( "onfocusin" )', 1, function ( assert ) {
-       var frameDoc, frameEl,
-               log = [],
-               frame = document.createElement( 'iframe' );
-
-       function handleParentBodyFocus() {
-               log.push('parent-body');
-       }
-       function handleIframeDocFocus() {
-               log.push('iframe-doc');
-       }
-       function handleIframeInputFocus() {
-               log.push('iframe-input');
-       }
-
-       $( '#qunit-fixture' ).append( frame );
-       frameDoc = ( frame.contentWindow && frame.contentWindow.document ) || 
frame.contentDocument;
-       frameEl = frameDoc.createElement( 'input' );
-       frameDoc.documentElement.appendChild( frameEl );
-
-       $( 'body' ).on( 'focusin', handleParentBodyFocus );
-       $( frameDoc )
-               .on( 'focusin', handleIframeDocFocus );
-
-       $( frameEl ).on( 'focusin', handleIframeInputFocus );
-       frameEl.focus();
-       $( frameEl ).remove();
-       frameEl.focus();
-
-       $( 'body' ).off( 'focusin', handleParentBodyFocus );
-       $( frameDoc ).off( 'focusin', handleIframeDocFocus );
-
-       assert.deepEqual( log, [ 'iframe-input', 'iframe-doc' ] );
-} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89920e7d6da234ec1af2cdbb86558c640ebcae4b
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to