aboutsummaryrefslogtreecommitdiffstats
path: root/test/jquery.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-08-27 00:31:14 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-08-29 13:52:46 -0400
commitca1c90e55c05610c28a176e3bcb2a64450b5e296 (patch)
tree10ae3e55c118fb99ed89394796cc6a65fb8937cb /test/jquery.js
parent01d5a1a1c9d5469057cafc5a2b27668d0e04ad22 (diff)
downloadjquery-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.js4
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