exports.testInitialization = function () { settings.initializeSettings(); //assert.equal("Settings-backend.requestPopulateJSWithCallback_", lastCall.method); assert.equal(42, backingObject.coincidentallyImprobable); assert.equal(42, settings.get("coincidentallyImprobable")); delete backingObject.coincidentallyImprobable; };
kirin.native2js.registerProxy("Settings-backend", methods); var proxy = kirin.proxy("Settings-backend"); var backingObject = { coincidentallyImprobable: 42 }; proxy.requestPopulateJSWithCallback_ = function (callback) { kirin.native2js.callCallback(callback, backingObject); kirin.native2js.deleteCallback(callback); }; var settings = require("Settings"); settings.initializeSettings(); var lastCall = Native.lastCall; assert.equal("undefined", typeof lastCall.method); exports.testInitialization = function () { settings.initializeSettings(); //assert.equal("Settings-backend.requestPopulateJSWithCallback_", lastCall.method); assert.equal(42, backingObject.coincidentallyImprobable); assert.equal(42, settings.get("coincidentallyImprobable")); delete backingObject.coincidentallyImprobable; };