<html> <body> <p>In this test we need to find out if the browser can save the localStorage item correctly without truncated by the \x00 in the middle of the string.</p> <script type="text/javascript"> var key = 'TruncVal'; var value = '123\x00567'; var x = localStorage.getItem(key); if (!x) { localStorage.setItem(key, value); document.write("<p>It hasn't got the '" + key + "' in the localStorage database, will create it using:<br>"); document.write("<code>localStorage.setItem('" + key + "', '" + value + "');</code><br>"); document.write("Now close your browser and start it again to see the results.</p>"); } else { document.write("<p>The value of " + key + " is: '" + x + "', the length is: " + x.length + "<br>"); if (x == value) { document.write("PASS."); } else { document.write("FAIL: The expected value is: '" + value + "', the expected length is: " + value.length); } document.write("</p><a href=\"javascript:localStorage.removeItem('" + key + "');\">remove '" + key + "' from localStorage</a>"); } </script> <p>This is for <a href="https://bugs.webkit.org/show_bug.cgi?id=58762">https://bugs.webkit.org/show_bug.cgi?id=58762</a> </p> </body> </html>