diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-08-27 00:31:14 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-08-29 13:52:46 -0400 |
commit | ca1c90e55c05610c28a176e3bcb2a64450b5e296 (patch) | |
tree | 10ae3e55c118fb99ed89394796cc6a65fb8937cb /test/jquery.js | |
parent | 01d5a1a1c9d5469057cafc5a2b27668d0e04ad22 (diff) | |
download | jquery-ca1c90e55c05610c28a176e3bcb2a64450b5e296.tar.gz jquery-ca1c90e55c05610c28a176e3bcb2a64450b5e296.zip |
Use window.QUnit to detect the top window when loading with AMD
Diffstat (limited to 'test/jquery.js')
-rw-r--r-- | test/jquery.js | 4 |
1 files changed, 3 insertions, 1 deletions
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 |