From 4c3e63b47ca78a761d5408c48bd921cde97d8d4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski?= Date: Mon, 14 Sep 2015 21:14:23 +0200 Subject: [PATCH] Tests: Account for Edge in originalEvent UA-sniffs All other cases where Edge user agent needed to be taken into account in tests have already been resolved. (cherry-picked from 64fd7ef3d081b5c65d541237f73a4d89f0f0ad7b) Fixes gh-2357 --- test/unit/event.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/unit/event.js b/test/unit/event.js index 2184b3cdf..4d4d7f1ca 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -2848,14 +2848,12 @@ QUnit.test( "originalEvent property for IE8", function( assert ) { jQuery( "#donor-input" )[ 0 ].click(); } ); -QUnit.test( "originalEvent property for Chrome, Safari and FF of simulated event", function( assert ) { +QUnit.test( "originalEvent property for Chrome, Safari, Fx & Edge of simulated event", function( assert ) { var userAgent = window.navigator.userAgent; - if ( !( /chrome/i.test( userAgent ) || - /firefox/i.test( userAgent ) || - /safari/i.test( userAgent ) ) ) { + if ( !( /firefox/i.test( userAgent ) || /safari/i.test( userAgent ) ) ) { assert.expect( 1 ); - assert.ok( true, "Assertions should run only in Chrome, Safari and FF" ); + assert.ok( true, "Assertions should run only in Chrome, Safari, Fx & Edge" ); return; } @@ -2881,7 +2879,7 @@ QUnit.test( "originalEvent property for Chrome, Safari and FF of simulated event jQuery( "#donor-input" ).trigger( "focus" ); } ); -// This tests are unreliable in Firefox +// These tests are unreliable in Firefox if ( !( /firefox/i.test( window.navigator.userAgent ) ) ) { QUnit.test( "Check order of focusin/focusout events", function( assert ) { assert.expect( 2 ); -- 2.39.5