From 4907a7389faf36f16aef2ce244b3b77d944a78ba Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 29 Jan 2013 22:59:09 -0800 Subject: [PATCH] Fix test.js for browsers. Former-commit-id: e334ab595fa78a59b8371b755ce8dc54706a6630 --- test/test.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/test.js b/test/test.js index 89ccdaf21..6fcc60aca 100644 --- a/test/test.js +++ b/test/test.js @@ -1,12 +1,6 @@ ;(function(window, undefined) { 'use strict'; - /** Detect free variable `global` and use it as `window` */ - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal) { - window = freeGlobal; - } - /** Use a single load function */ var load = typeof require == 'function' ? require : window.load; @@ -15,7 +9,7 @@ var min = 0; var result = window.system ? (min = 1, system.args) - : (window.process ? (min = 2, process.argv) : window.arguments); + : (window.process ? (min = 2, process.argv) : (window.arguments || [])); result = result.length > min ? result[result.length - 1] @@ -2709,4 +2703,4 @@ if (!window.document) { QUnit.start(); } -}(this)); +}(typeof global == 'object' && global || this));