storage_session-manual.html (1252B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>WebStorage Test: session storage</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <meta name="flags" content="interact"> 6 7 <h2>Description</h2> 8 <p> 9 This test validates that store the data using Session Storage which means that even if you close the page, and re-open it, the data saved before should be lost. 10 </p> 11 12 <ol class="instructions"> 13 <li> 14 Click the "Clear" button, refresh the page once and then check if the page shows "You have viewed this page 1 time(s)" 15 </li> 16 <li> 17 Close the page, re-open it and then check if the page still shows "You have viewed this page 1 time(s)" 18 </li> 19 <li> 20 If the above two steps are all true the test case pass, otherwise it fail.<br> 21 </li> 22 </ol> 23 24 <p> 25 <h2>You have viewed this page 26 <span id="count">an untold number of</span> 27 time(s).</h2> 28 <button type="button" onclick="javascript:sessionStorage.pageLoadCount = 0;"><h3>Clear</h3></button> 29 </p> 30 31 <script> 32 33 if (!sessionStorage.pageLoadCount) { 34 sessionStorage.pageLoadCount = 0; 35 } 36 sessionStorage.pageLoadCount = parseInt(sessionStorage.pageLoadCount) + 1; 37 document.getElementById('count').textContent = sessionStorage.pageLoadCount; 38 39 </script>