testing both cases of the logic required for #167

This commit is contained in:
El RIDO 2017-10-22 10:39:18 +02:00
parent 6dbb098d7a
commit 414693fa90
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
5 changed files with 30 additions and 14 deletions

View file

@ -965,10 +965,14 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
*
* @name UiHelper.mockHistoryChange
* @function
* @param {string} state (optional) state to mock
*/
me.mockHistoryChange = function()
me.mockHistoryChange = function(state)
{
historyChange($.Event('popstate', {originalEvent: new PopStateEvent('popstate', {state: null}), target: window}));
if (typeof state === 'undefined') {
state = null;
}
historyChange($.Event('popstate', {originalEvent: new PopStateEvent('popstate', {state: state}), target: window}));
}
/**