Fixed localStorage test function.