loader-tests.js revision f5897ba2954c05ae4877fc728b4b33a47a65a21b
4133N/A var jsFailure = !((ua.ie && ua.ie < 9) || (ua.opera && ua.opera < 11.6) || (ua.webkit && ua.webkit < 530.17));
4133N/A test_resolve_no_calc: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_manual_calc: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_auto_calc: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_combo: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_filter_debug: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_filter_min: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_filter_raw: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_combo_sep: function() {
4133N/A ignoreRegistered: true,
4133N/A test_resolve_combo_sep_group: function() {
4133N/A ignoreRegistered: true,
bar: {
Assert.isTrue((out.js[out.js.length - 1].indexOf('==!!==') === -1), 'Group comboSep contains Main comboSep');
test_resolve_maxurl_length: function() {
combine: true,
ignoreRegistered: true,
test_resolve_maxurl_length_higher: function() {
combine: true,
ignoreRegistered: true,
test_resolve_maxurl_length_too_low: function() {
combine: true,
ignoreRegistered: true,
test_resolve_maxurl_length_group: function() {
combine: true,
ignoreRegistered: true,
groups: {
extra: {
combine: true,
modules: {
foo: {
bar: {
test_resolve_filters: function() {
combine: true,
ignoreRegistered: true,
test_group_filters: function() {
var test = this;
YUI({
debug: true,
groups: {
local: {
combine: false,
modules: {
foo: {
test_iter: function() {
var test = this;
YUI({
Y.LOADED = true;
YUI({
Y.LOADED = true;
test_progress: function() {
var test = this,
YUI({
onSuccess: function(e) {
onProgress: function(e) {
proContext = this;
counter++;
Y.LOADED = true;
test_failure: function() {
var test = this,
fMsg;
YUI({
onFailure: function(e) {
fMsg = e;
modules: {
var e = fMsg;
test_timeout: function() {
var test = this,
fMsg;
YUI({
onTimeout: function(e) {
fMsg = e;
modules: {
var e = fMsg;
test_condpattern: function() {
var test = this;
YUI({
groups: {
testpatterns: {
patterns: {
modtest: {
test_cond_with_test_function: function() {
var test = this;
YUI({
modules: {
cond2: {
condition: {
test: function() {
test_cond_no_test_or_ua: function() {
var test = this;
YUI({
modules: {
cond: {
condition: {
test_css_stamp: function() {
var test = this,
links = document.getElementsByTagName('link').length + document.getElementsByTagName('style').length;
var links2 = document.getElementsByTagName('link').length + document.getElementsByTagName('style').length;
test_forcemap: function() {
var test = this;
ignoreRegistered: true,
test_global_mods: function() {
var conf = {
combine: false,
Assert.areEqual(mods1.css.length, mods2.css.length, 'CSS Modules are not equal in 2 loader instances');
test_skin_default: function() {
Assert.areSame(loader.skin.defaultSkin, Y.Env.meta.skin.defaultSkin, 'Default skin was not set from default');
test_skin_string: function() {
test_skin_object: function() {
skin: {
test_skin_overrides: function() {
skin: {
overrides: {
slider: [
Assert.areSame(loader.skin.overrides.slider.length, out.css.length, 'Failed to load all override skins');
test_load_optional: function() {
loadOptional: true,
ignoreRegistered: true,
var hasOptional = false;
hasOptional = true;
test_load_css_without_type: function() {
combine: false,
ignoreRegistered: true,
modules: {
somecss: {
test_load_as_string: function() {
combine: false,
ignoreRegistered: true,
modules: {
test_combine_no_core_top_level: function() {
combine: true,
modules: {
foobar: {
combine: true,
Assert.areSame('http://foobar.com/combo?foo/foo.js', out.js[2], 'Failed to combine manual JS file properly');
test_combine_no_core_group: function() {
groups: {
local: {
combine: true,
modules: {
foobar: {
Assert.areSame('http://foobar.com/combo?bar.js&path/to/baz.js&foo/foo.js', out.js[0], 'Failed to combine JS files properly');
Assert.areSame('http://foobar.com/combo?my/css/files.css', out.css[0], 'Failed to combine CSS files properly');
test_outside_group: function() {
combine: true,
ignoreRegistered: true,
groups: {
mygallery: {
combine:true,
modules: {
outside: {
combine:false,
modules:{
test_outside_nocombine: function() {
combine: false,
ignoreRegistered: true,
groups: {
mygallery: {
combine:true,
modules: {
test_submodules: function() {
ignoreRegistered: true,
combine: false,
modules: {
sub1: {
submodules: {
subsub1: {
subsub2: {
skinnable: true
Assert.areSame('sub1/lang/subsub2.js', out.js[0], 'Failed to combine submodule with module path for LANG JS');
Assert.areSame('sub1/assets/skins/sam/subsub2.css', out.css[0], 'Failed to combine submodule with module path CSS');
test_plugins: function() {
ignoreRegistered: true,
combine: false,
modules: {
plug1: {
plugins: {
subplug1: {
skinnable: true
subplug2: {
skinnable: true,
Assert.areSame('plug1/lang/subplug2.js', out.js[0], 'Failed to combine plugin with module path LANG JS');
Assert.areSame('plug1/lang/subplug1.js', out.js[1], 'Failed to combine plugin with module path LANG JS');
Assert.areSame('plug1/assets/skins/sam/subplug1.css', out.css[0], 'Failed to combine plugin with module path CSS');