aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-07-06 10:12:20 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-07-06 10:12:20 -0400
commitf5fd41252e3ae48a655c5da4a0b2910bb897b6ed (patch)
tree2128bb89a2e85ca05e79cdaf8772df5f3e20b7e7 /test/unit
parentaaf134bb7092efe7b450fc08ca5cc3c53cb00d76 (diff)
downloadjquery-f5fd41252e3ae48a655c5da4a0b2910bb897b6ed.tar.gz
jquery-f5fd41252e3ae48a655c5da4a0b2910bb897b6ed.zip
Fix #12018, readyState "interactive" in oldIE lies! Closes gh-848.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/event.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index 2261e6f79..6d3603672 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -2345,7 +2345,7 @@ test("jQuery.off using dispatched jQuery.Event", function() {
test( "delegated event with delegateTarget-relative selector (#)", function() {
expect(1);
var markup = jQuery( '<ul><li><ul id="u1"><li id="f1"></li></ul></li>' ).appendTo("body");
-
+
markup
.find("#u1")
.on( "click", "li:first", function() {
@@ -2884,14 +2884,22 @@ if ( hasPHP ) {
ok( isOk, "$.when( $.ready ) works" );
});
- testIframeWithCallback( "jQuery.ready synchronous load with long loading iframe", "event/syncReady", function( isOk ) {
- expect(1);
- ok( isOk, "jQuery loaded synchronously fires ready before all sub-resources are loaded" );
- });
+ // oldIE needs all subresources to be loaded before it can gaurantee the document is truly ready to be interacted with
+ if( document.addEventListener ) {
+ testIframeWithCallback( "jQuery.ready synchronous load with long loading iframe", "event/syncReadyLongLoad", function( isOk ) {
+ expect(1);
+ ok( isOk, "jQuery loaded synchronously fires ready before all sub-resources are loaded" );
+ });
+
+ testIframeWithCallback( "jQuery.ready asynchronous load with long loading iframe", "event/asyncReady", function( isOk ) {
+ expect(1);
+ ok( isOk, "jQuery loaded asynchronously fires ready before all sub-resources are loaded" );
+ });
+ }
- testIframeWithCallback( "jQuery.ready asynchronous load with long loading iframe", "event/asyncReady", function( isOk ) {
+ testIframeWithCallback( "jQuery.ready synchronous load with long loading subresources", "event/syncReady", function( isOk ) {
expect(1);
- ok( isOk, "jQuery loaded asynchronously fires ready before all sub-resources are loaded" );
+ ok( isOk, "jQuery loaded synchronously fires ready when the DOM can truly be interacted with" );
});
}