Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2635)

Unified Diff: chrome/test/data/History/history_length_test1.html

Issue 159329: Revert 19923 - Merge r15950.... (Closed) Base URL: svn://chrome-svn/chrome/branches/172/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/History/HistoryHelper.js ('k') | chrome/test/data/History/history_length_test2.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/History/history_length_test1.html
===================================================================
--- chrome/test/data/History/history_length_test1.html (revision 21500)
+++ chrome/test/data/History/history_length_test1.html (working copy)
@@ -0,0 +1,66 @@
+<html>
+<head><title>History test1</title>
+<script src="HistoryHelper.js"></script>
+</head>
+
+<body onload="onLoad();">
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+History Test1 running....
+</body>
+
+<SCRIPT type="text/javascript">
+var first_run_cookie = "First_History_Test_Run";
+var second_run_cookie = "Second_History_Test_Run";
+
+function onLoad() {
+ if (readCookie(second_run_cookie) != null) {
+ setTimeout(OnValidateHistoryForSecondRun, 100);
+ return true;
+ }
+
+ if (readCookie(first_run_cookie) != null) {
+ setTimeout(OnMoveForwardInHistory, 100);
+ return true;
+ }
+
+ setTimeout(OnNavigateToPage2, 100);
+ return true;
+}
+
+function OnValidateHistoryForSecondRun() {
+ eraseCookie(first_run_cookie);
+ eraseCookie(second_run_cookie);
+
+ if (window.history.length != 2) {
+ onFailure("History_Length_Test", 1, "Second run history length mismatch");
+ return false;
+ }
+
+ onSuccess("History_Length_Test", 1);
+ return true;
+}
+
+function OnMoveForwardInHistory() {
+ if (window.history.length != 2) {
+ onFailure("History_Length_Test", 1, "History length mismatch in MoveForward navigation");
+ return false;
+ }
+
+ createCookie(second_run_cookie, "1", "1");
+ window.history.forward();
+ return true;
+}
+
+function OnNavigateToPage2() {
+ if (window.history.length != 2) {
+ onFailure("History_Length_Test", 1, "History length mismatch in initial navigation");
+ return false;
+ }
+
+ createCookie(first_run_cookie, "1", "1");
+ window.location.href = "history_length_test2.html";
+ return true;
+}
+
+</SCRIPT>
+</html>
« no previous file with comments | « chrome/test/data/History/HistoryHelper.js ('k') | chrome/test/data/History/history_length_test2.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698