function simulateResize() {
// IE doesn't allow simulation of window.onresize, so I can't use
//Y.Event.simulate(Y.config.win, 'resize');
setTimeout(function () {
type: 'resize',
});
}, 10);
}
name: 'subscribe',
_should: {
ignore: {
// I can't get this damn test to pass in CI. It's likely a bad
// test, but I'm having a hell of a time divising a good one.
"test resize event throttling": true
}
},
"test Y.on('windowresize', fn)": function () {
var test = this,
function handler(e) {
var thisObj = this,
});
}
this.wait();
},
"test node.on('windowresize', fn)": function () {
var test = this,
function handler(e) {
var thisObj = this,
// TODO: is this a bug?
});
}
this.wait();
},
"test resize event throttling": function () {
var test = this,
// This prevents the test from timing out if the browser is
// inordinately slow
});
}),
// Allow for 10ms of leeway from the threshold. FF is firing a few
// milliseconds before the threshold, and I think that's close
// enough
fudge = 10;
var delay = 10,
var end = new Date();
if (testThresholds.length) {
} else {
}
});
});
// recursive async function that fires resize on an incrementing
// delay, starting at 10ms, then 20ms, 30ms, and so on.
function scheduleResize() {
start = new Date();
});
delay += 10;
}
}
}
}));