From ca1c90e55c05610c28a176e3bcb2a64450b5e296 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 27 Aug 2013 00:31:14 -0400 Subject: [PATCH] Use window.QUnit to detect the top window when loading with AMD --- test/jquery.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5