Cleanup a couple of consts left un-renamed.
[chromium-blink-merge.git] / third_party / webdriver / test_data / sessionCookieDest.html
blobf465b38dc1797599e46b15b1dab7329826830b0f
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>Session cookie destination</title>
6 <script type="text/javascript">
7 //Get cookie routine by Shelley Powers
8 function get_cookie(Name) {
9 var search = Name + "=";
10 var returnvalue = "";
11 if (document.cookie.length > 0) {
12 offset = document.cookie.indexOf(search);
13 // if cookie exists
14 if (offset != -1) {
15 offset += search.length;
16 // set index of beginning of value
17 end = document.cookie.indexOf(";", offset);
18 // set index of end of cookie value
19 if (end == -1) end = document.cookie.length;
20 returnvalue=unescape(document.cookie.substring(offset, end))
23 return returnvalue;
26 function setcolor(){
27 document.body.style.backgroundColor=get_cookie("bgcolor")
29 </script>
30 </head>
31 <body onload="setcolor()">
32 This is the cookie destination page.
33 </body>
34 </html>