]> source.dussan.org Git - jquery.git/commitdiff
Tests: Keep iframes visible in TestSwarm
authorRichard Gibson <richard.gibson@gmail.com>
Sat, 29 Apr 2017 03:54:06 +0000 (23:54 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Sat, 29 Apr 2017 03:54:06 +0000 (23:54 -0400)
Ref 1d2df772b4d6e5dbf91df6e75f4a1809f7879ab0

test/data/testinit.js

index 07db69695b42b3cd46766ba52fdac6bd8467ae85..52179547634dd929a78470f789c5e179c5e43b8f 100644 (file)
@@ -238,8 +238,19 @@ this.testIframe = function( title, fileName, func, wrapper ) {
        wrapper.call( QUnit, title, function( assert ) {
                var done = assert.async(),
                        $iframe = supportjQuery( "<iframe/>" )
-                               .css( { position: "absolute", width: "500px", left: "-600px" } )
-                               .attr( { id: "qunit-fixture-iframe", src: url( "./data/" + fileName ) } );
+                               .attr( { id: "qunit-fixture-iframe", src: url( "./data/" + fileName ) } )
+                               .css( {
+                                       position: "absolute",
+                                       top: "0",
+                                       left: "-600px",
+                                       height: "300px",
+                                       width: "500px"
+                               } );
+
+               // Overcome TestSwarm iframe visibilty quirks
+               if ( QUnit.isSwarm ) {
+                       $iframe.css( { left: "0" } );
+               }
 
                // Test iframes are expected to invoke this via startIframeTest (cf. iframeTest.js)
                window.iframeCallback = function() {