aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-05-12 13:38:33 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-05-12 14:23:50 -0400
commitb6581df5de2083e322dcbede4dce74bacf93af5f (patch)
treecdb57749ed1bd8aeb3a6717145eae5369061bd48 /test
parent7799f21307c3e7c16c1b99b79b8f9f93f969b440 (diff)
downloadjquery-b6581df5de2083e322dcbede4dce74bacf93af5f.tar.gz
jquery-b6581df5de2083e322dcbede4dce74bacf93af5f.zip
Fix #11621, $(document).trigger() must bubble to window.
Diffstat (limited to 'test')
-rw-r--r--test/unit/event.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index 57adb0443..d5582190a 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -928,7 +928,7 @@ test("trigger() shortcuts", function() {
});
test("trigger() bubbling", function() {
- expect(17);
+ expect(18);
var win = 0, doc = 0, html = 0, body = 0, main = 0, ap = 0;
@@ -964,6 +964,9 @@ test("trigger() bubbling", function() {
equal( main, 1, "ap bubble" );
equal( ap, 1, "ap bubble" );
+ jQuery( document ).trigger("click");
+ equal( win, 4, "doc bubble" );
+
// manually clean up events from elements outside the fixture
jQuery(document).unbind("click");
jQuery("html, body, #qunit-fixture").unbind("click");