tests[localstorage] = function() {
        try {
          return ('localStorage' in window) && window[localstorage] !== null;
        } catch(e) {
          return false;