Do not announce robot account token before account ID is available
[chromium-blink-merge.git] / chrome / test / data / History / history_length_test_page_3.html
blobc0154fe8c82a406bded338725f2cdf99efd1c128
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head><title>History Test Page 3</title>
3 <script type="text/javascript" src="HistoryHelper.js"></script>
4 </head>
6 <body onload="onLoad();">
7 <div id="statusPanel" style="border: 1px solid red; width: 100%">
8 History Test Page 3....
9 </div>
10 </body>
12 <script type="text/javascript">
14 function onLoad() {
15 if (readCookie(navigate_forward_cookie) != null) {
16 setTimeout(OnNavigateForward, 0);
17 return true;
19 if (readCookie(navigate_backward_cookie) != null) {
20 setTimeout(OnNavigateBackward, 0);
21 return true;
23 setTimeout(OnInitialLoad, 0);
24 return true;
27 function OnInitialLoad() {
28 // This page could be visited in the following sequences:-
29 // 1. history_length_test_page2.html redirect to
30 // history_length_test_page3.html
31 // 1. history_length_test_page1.html -> history_length_test_page2.html
32 // redirects to history_length_page3.html.
33 // This history lengths could be 3 or 5.
34 if (window.history.length != 3 && window.history.length != 4) {
35 onFailure("History_Length_Test_2", 1,
36 "History length mismatch on initial load at page 3: " +
37 window.history.length);
38 return false;
40 onSuccess("History_Length_Test_2", 1);
41 return true;
44 function OnNavigateBackward() {
45 if (window.history.length != 5) {
46 onFailure("History_Length_Test_3", 1,
47 "History length mismatch on navigating backward at page 3: " +
48 window.history.length);
49 return false;
51 window.history.back();
52 return true;
55 function OnNavigateForward() {
56 if (window.history.length != 5) {
57 onFailure("History_Length_Test_3", 1,
58 "History length mismatch on navigating forward at page 3: " +
59 window.history.length);
60 return false;
62 window.history.forward();
63 return true;
66 </script>
67 </html>