Improve localStorage test