diff options
Diffstat (limited to 'js/test/Ice/exceptionsBidir/Client.js')
-rw-r--r-- | js/test/Ice/exceptionsBidir/Client.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/js/test/Ice/exceptionsBidir/Client.js b/js/test/Ice/exceptionsBidir/Client.js index 5c193f744a1..7f734691966 100644 --- a/js/test/Ice/exceptionsBidir/Client.js +++ b/js/test/Ice/exceptionsBidir/Client.js @@ -7,21 +7,18 @@ // // ********************************************************************** -(function(global){ - var require = typeof(module) !== "undefined" ? module.require : function(){}; - require("Ice/Ice"); - var Ice = global.Ice; - var Promise = Ice.Promise; +(function(module, require, exports) +{ + var Ice = require("icejs").Ice; + var Test = require("Test").Test; + var TestAMD = require("TestAMD").TestAMD; - require("Test"); - require("TestAMD"); - require("../exceptions/Client"); + var Promise = Ice.Promise; - require("ThrowerI"); - var ThrowerI = global.ThrowerI; - require("AMDThrowerI"); - var AMDThrowerI = global.AMDThrowerI; + var Client = require("../exceptions/Client"); + var ThrowerI = require("ThrowerI").ThrowerI; + var AMDThrowerI = require("AMDThrowerI").AMDThrowerI; var allTests = function(out, communicator, amd) { @@ -44,7 +41,7 @@ function(conn) { conn.setAdapter(adapter); - return __clientAllTests__(out, communicator, amd ? global.TestAMD : global.Test); + return Client.__clientAllTests__(out, communicator, amd ? TestAMD : Test); }); }); }); @@ -82,7 +79,7 @@ communicator = Ice.initialize(id); var ref = "__echo:default -p 12010"; var base = communicator.stringToProxy(ref); - return global.Test.EchoPrx.checkedCast(base); + return Test.EchoPrx.checkedCast(base); } ).then( function(prx) @@ -97,6 +94,9 @@ }); return p; }; - global.__test__ = run; - global.__runEchoServer__ = true; -}(typeof (global) === "undefined" ? window : global)); + exports.__test__ = run; + exports.__runEchoServer__ = true; +} +(typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined, + typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? require : window.Ice.__require, + typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? exports : window)); |