jsonp-test.js revision e7eae9b3ca0194e8c08f10b485269a2cdb28b450
name : "Callback in URL",
"callback in URL should be executed": function () {
var self = this;
});
};
Y.jsonp("server/service.php?callback=globalFunction");
}
}));
name : "Callback function",
"callback function as second arg should be success handler": function () {
var self = this;
});
});
},
"inline callback should be replaced if function passed": function () {
var self = this;
});
};
});
});
}
}));
name : "Callback object",
"success handler in callback object should execute": function () {
var self = this;
Y.jsonp("server/service.php", {
on: {
});
}
}
});
},
"inline callback should be replaced if success function provided in config": function () {
var self = this;
});
};
Y.jsonp("server/service.php?callback=globalFunction", {
on: {
});
}
}
});
}
}));
name : "Complex callback path in URL (jsonp-url)",
"complex nested callback in URL should be executed": function () {
var self = this;
null,
null,
{
nested: {
global: {
func: {
});
}
}
}
}
}
];
Y.jsonp('server/service.php?callback=deeply[2]nested["global"].func["tion"]');
},
"callback relative to Y should be executed": function () {
var self = this;
Y.callbackFunction = function (json) {
delete Y.callbackFunction;
});
};
Y.jsonp("server/service.php?callback=callbackFunction");
},
"nested inline callback relative to Y should be executed": function () {
var self = this;
Y.deeply = [
null,
null,
{
nested: {
global: {
func: {
delete Y.deeply;
});
}
}
}
}
}
];
Y.jsonp('server/service.php?callback=deeply[2]nested["global"].func["tion"]');
},
"inline callback including 'Y.' should be executed": function () {
var self = this;
Y.callbackFunction = function (json) {
delete Y.callbackFunction;
});
};
Y.jsonp("server/service.php?callback=Y.callbackFunction");
},
"inline callback should be replaced if function passed": function () {
var self = this;
Y.deeply = [
null,
null,
{
nested: {
global: {
func: {
delete Y.deeply;
});
}
}
}
}
}
];
delete Y.deeply;
});
});
},
"inline callback should be replaced if success function provided in config": function () {
var self = this;
Y.deeply = [
null,
null,
{
nested: {
global: {
func: {
delete Y.deeply;
});
}
}
}
}
}
];
Y.jsonp('server/service.php?callback=deeply[2]nested["global"].func["tion"]', {
on: {
delete Y.deeply;
});
}
}
});
}
}));