3 <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>
4 <script type=
"text/javascript">
6 var value
= '123\x00567';
8 var x
= localStorage
.getItem(key
);
10 localStorage
.setItem(key
, value
);
11 document
.write("<p>It hasn't got the '" + key
+ "' in the localStorage database, will create it using:<br>");
12 document
.write("<code>localStorage.setItem('" + key
+ "', '" + value
+ "');</code><br>");
13 document
.write("Now close your browser and start it again to see the results.</p>");
16 document
.write("<p>The value of " + key
+ " is: '" + x
+ "', the length is: " + x
.length
+ "<br>");
19 document
.write("PASS.");
22 document
.write("FAIL: The expected value is: '" + value
+ "', the expected length is: " + value
.length
);
24 document
.write("</p><a href=\"javascript:localStorage.removeItem('" + key
+ "');\">remove '" + key
+ "' from localStorage</a>");
28 <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>