]> source.dussan.org Git - jquery.git/commitdiff
Revert "Tests: Revert some testIframe changes to fix dimensions tests"
authorRichard Gibson <richard.gibson@gmail.com>
Sat, 29 Apr 2017 06:05:46 +0000 (02:05 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Sat, 29 Apr 2017 06:05:46 +0000 (02:05 -0400)
This reverts commit c4368a93116e9d1d17587fc2f5421a891957cf45.

test/data/testinit.js

index 1aa9a65da8556b134963d949800355edcc73a8f4..f2c4ae2a54ea1f170bcaae93df37fbc1a51abe29 100644 (file)
@@ -238,8 +238,13 @@ this.testIframe = function( title, fileName, func, wrapper ) {
        wrapper.call( QUnit, title, function( assert ) {
                var done = assert.async(),
                        $iframe = supportjQuery( "<iframe/>" )
-                               .css( { position: "absolute", top: "0", left: "-600px", width: "500px" } )
-                               .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", width: "500px" } );
+
+               // Try to 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() {