history-html5-test.js revision 96f90701a09dfccf7b2503c9a3014b80d48f0c01
name: 'HistoryHTML5',
_should: {
// Ignore all tests in browsers without HTML5 history support.
ignore: {
'Y.History should === Y.HistoryHTML5 when history-hash is not loaded': noHTML5,
'add() should change state': noHTML5,
'replace() should change state without a new history entry': noHTML5,
}
},
setUp: function () {
this.history = new Y.HistoryHTML5();
},
tearDown: function () {
delete this.history;
if (!noHTML5) {
}
},
// -- useHistoryHTML5 ------------------------------------------------------
'Y.History should === Y.HistoryHTML5 by default except when not supported': function () {
if (noHTML5) {
} else {
}
},
'Y.config.useHistoryHTML5 should specify the behavior of the Y.History alias': function () {
var Z;
// This gets a littly nutty, so just bear with me here.
},
// -- 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);
}
},
// Note: Google Chrome <= 5 is buggy and doesn't update location.href or
// location.pathname when the URL is changed via pushState() or
// replaceState(), so it's excluded from this test. This bug is not present
// in Chrome 6.
'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);
}
},
// Note: Google Chrome <= 5 is buggy and doesn't update location.href or
// location.pathname when the URL is changed via pushState() or
// replaceState(), so it's excluded from this test. This bug is not present
// in Chrome 6.
'replace() should set a custom URL': function () {
}
}));