4 function saveAndCheckRandomNumber() {
5 if (!sessionStorage
.lastRandom
) {
6 sessionStorage
.lastRandom
= randomNumber
;
8 window
.passed
= sessionStorage
.lastRandom
!= randomNumber
;
12 <script type=
"text/javascript" src=
"resources/cache-simulator.cgi?uniqueId=1&Cache-control=no-store,no-cache,private,must-revalidate,max-age=0"></script>
13 <script type=
"text/javascript" src=
"resources/cache-simulator.cgi?uniqueId=2&Cache-control=no-store,no-cache,private,must-revalidate,max-age=0" onload=
"saveAndCheckRandomNumber();"></script>
16 <script type=
"text/javascript">
17 if (window
.testRunner
) {
18 testRunner
.dumpAsText();
19 testRunner
.waitUntilDone();
21 if (document
.referrer
!= document
.location
.toString()) {
22 console
.log('Reloading');
23 document
.location
.reload();
25 if (window
.passed
=== true) {
26 document
.body
.innerText
= "PASS";
27 } else if (window
.passed
=== false) {
28 document
.body
.innerText
= "FAIL";
30 document
.body
.innerText
= "ERROR";
32 delete sessionStorage
.lastRandom
;
33 if (window
.testRunner
) {
34 testRunner
.notifyDone();