diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2014-05-29 21:45:59 +0400 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2014-05-29 21:45:59 +0400 |
commit | efc4f8d7814a8c44bd5b4d924d237a04263e1a85 (patch) | |
tree | f2559d0391908674c9fcc34bc1c9aa12ac39af4c | |
parent | 1d931068d30b6a516b883cf7f420606de21eab68 (diff) | |
download | jquery-efc4f8d7814a8c44bd5b4d924d237a04263e1a85.tar.gz jquery-efc4f8d7814a8c44bd5b4d924d237a04263e1a85.zip |
Selector: Fix test iframe submission for firefox
Ref jquery/sizzle@20fbadb0870bd30e0e66c68891f121c0450374c4
-rw-r--r-- | test/unit/selector.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index 88d8a7ee2..eeba98413 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -475,10 +475,10 @@ testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles equal( jQuery(".evil a").length, 0, "Select nothing again with second sizzle" ); }); -asyncTest( "Iframe dispatch should not affect Sizzle, see #13936", 1, function() { +asyncTest( "Iframe dispatch should not affect jQuery (#13936)", 1, function() { var loaded = false, thrown = false, - iframe = document.getElementById("iframe"), + iframe = document.getElementById( "iframe" ), iframeDoc = iframe.contentDocument || iframe.contentWindow.document; jQuery( iframe ).on( "load", function() { @@ -486,17 +486,13 @@ asyncTest( "Iframe dispatch should not affect Sizzle, see #13936", 1, function() try { iframeDoc = this.contentDocument || this.contentWindow.document; - form = jQuery( "#navigate", iframeDoc )[ 0 ]; + form = Sizzle( "#navigate", iframeDoc )[ 0 ]; } catch ( e ) { thrown = e; } if ( loaded ) { - strictEqual( thrown, false, "No error thrown from post-reload jQuery call" ); - - // clean up - jQuery( iframe ).off(); - + strictEqual( thrown, false, "No error thrown from post-reload Sizzle call" ); start(); } else { loaded = true; @@ -505,6 +501,6 @@ asyncTest( "Iframe dispatch should not affect Sizzle, see #13936", 1, function() }); iframeDoc.open(); - iframeDoc.write("<body><form id='navigate'></form></body>"); + iframeDoc.write( "<body><form id='navigate' action='?'></form></body>" ); iframeDoc.close(); }); |