From: Timmy Willison Date: Tue, 27 Aug 2013 04:31:14 +0000 (-0400) Subject: Use window.QUnit to detect the top window when loading with AMD X-Git-Tag: 2.1.0-beta1~63 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ca1c90e55c05610c28a176e3bcb2a64450b5e296;p=jquery.git Use window.QUnit to detect the top window when loading with AMD --- diff --git a/test/jquery.js b/test/jquery.js index 33fa293d9..e43493967 100644 --- a/test/jquery.js +++ b/test/jquery.js @@ -26,7 +26,9 @@ label: "Load with AMD", tooltip: "Load the AMD jQuery file (and its dependencies)" }); - if ( QUnit.urlParams.amd && parent == window ) { + // If QUnit is on window, this is the main window + // This detection allows AMD tests to be run in an iframe + if ( QUnit.urlParams.amd && window.QUnit ) { require.config({ baseUrl: src }); src = "src/jquery"; // Include tests if specified