diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-08-27 00:31:14 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-08-27 00:31:14 -0400 |
commit | 9f433d9feca71bfe833376db306a8baa5e948a9d (patch) | |
tree | 47a34847cd2e49c3fd6e5b21f69e0f8dea0a7960 /test/jquery.js | |
parent | b718a169b5c3674aba5d96b2af775ec1dd0b4299 (diff) | |
download | jquery-9f433d9feca71bfe833376db306a8baa5e948a9d.tar.gz jquery-9f433d9feca71bfe833376db306a8baa5e948a9d.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 |