history-html5-test.js revision 8cd254d0dce086b53ca23716e564309f8da89edd
name: 'HistoryHTML5',
_should: {
// Ignore all tests in browsers without HTML5 history support.
ignore: {
'add() should change state': noHTML5,
'add() should set a custom URL': noHTML5,
'replace() should change state without a new history entry': noHTML5,
'replace() should set a custom URL': noHTML5
}
},
setUp: function () {
this.history = new Y.HistoryHTML5();
},
tearDown: function () {
delete this.history;
},
// -- add() ----------------------------------------------------------------
'add() should change state': function () {
var changeFired = false;
changeFired = true;
});
// Delay is necessary since the history:change event actually fires
// before the new state is pushed. Also, browsers limit history.length
// to 50, so if we're already at 50 we have to skip this assertion.
if (lastLength !== 50) {
this.wait(function () {
}, 20);
}
},
'add() should set a custom URL': function () {
},
// -- replace() ------------------------------------------------------------
'replace() should change state without a new history entry': function () {
var changeFired = false;
changeFired = true;
});
// Delay is necessary since the history:change event actually fires
// before the new state is pushed. Also, browsers limit history.length
// to 50, so if we're already at 50 we have to skip this assertion.
if (lastLength !== 50) {
this.wait(function () {
}, 20);
}
},
'replace() should set a custom URL': function () {
}
}));