]> source.dussan.org Git - jquery.git/commitdiff
Add setup function for the event module
authorOleg <markelog@gmail.com>
Mon, 30 Sep 2013 17:12:58 +0000 (21:12 +0400)
committerOleg <markelog@gmail.com>
Mon, 30 Sep 2013 17:17:10 +0000 (21:17 +0400)
(cherry picked from the commit 2c0b9027de841a437baf7b9c85262f196b9cb09e)

test/unit/event.js

index db4f9d0a82e11e670ebe088ebf89d473496a13e3..1cc5501c6f743f2ccbcd7d470d79d234f0acedb4 100644 (file)
@@ -1,4 +1,9 @@
-module("event", { teardown: moduleTeardown });
+module( "event", {
+       setup: function() {
+               document.body.focus();
+       },
+       teardown: moduleTeardown
+});
 
 test("null or undefined handler", function() {
        expect(2);
@@ -2644,8 +2649,6 @@ test( "Check order of focusin/focusout events", 2, function() {
        var focus, blur,
                input = jQuery( "#name" );
 
-       document.body.focus();
-
        input.on( "focus", function() {
                focus = true;