git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a30b321
)
Modified toggle() test to stop IE from browsing to another site, problem not solved
author
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Tue, 23 Jan 2007 11:10:02 +0000
(11:10 +0000)
committer
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Tue, 23 Jan 2007 11:10:02 +0000
(11:10 +0000)
src/event/eventTest.js
patch
|
blob
|
history
diff --git
a/src/event/eventTest.js
b/src/event/eventTest.js
index
13b47de
..
d621735
100644
(file)
--- a/
src/event/eventTest.js
+++ b/
src/event/eventTest.js
@@
-3,10
+3,14
@@
module("event");
test("toggle(Function, Function) - add toggle event and fake a few clicks", function() {
expect(1);
var count = 0,
test("toggle(Function, Function) - add toggle event and fake a few clicks", function() {
expect(1);
var count = 0,
- fn1 = function() { count++; },
- fn2 = function() { count--; },
+ fn1 = function(e) { count++; },
+ fn2 = function(e) { count--; console.debug("fn"); },
+ preventDefault = function(e) { e.preventDefault() },
link = $('#mark');
link = $('#mark');
- link.click().toggle(fn1, fn2).click().click().click().click().click();
+ if($.browser.msie)
+ ok( false, "click() on link gets executed in IE, not intended behaviour!" );
+ else
+ link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click();
ok( count == 1, "Check for toggle(fn, fn)" );
});
ok( count == 1, "Check for toggle(fn, fn)" );
});