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

Side by Side Diff: chrome/test/ui/history_uitest.cc

Issue 100245: Make forward/backward navigation work even when redirection is involved. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/History/history_length_test_page_4.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008, Google Inc. 1 // Copyright 2008, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 protected: 42 protected:
43 HistoryTester() : UITest() { } 43 HistoryTester() : UITest() { }
44 44
45 virtual void SetUp() { 45 virtual void SetUp() {
46 show_window_ = true; 46 show_window_ = true;
47 UITest::SetUp(); 47 UITest::SetUp();
48 } 48 }
49 }; 49 };
50 50
51 TEST_F(HistoryTester, VerifyHistoryLength) { 51 TEST_F(HistoryTester, VerifyHistoryLength) {
52 std::wstring test_case = L"history_length_test1.html"; 52 // Test the history length for the following page transitions.
53 GURL url = GetTestUrl(L"History", test_case); 53 //
54 NavigateToURL(url); 54 // Test case 1:
55 WaitForFinish("History_Length_Test", "1", url, kTestCompleteCookie, 55 // -open-> Page 1.
56 // Test case 2:
57 // -open-> Page 2 -redirect-> Page 3.
58 // Test case 3:
59 // -open-> Page 4 -navigate_backward-> Page 3 -navigate_backward->Page 1
60 // -navigate_forward-> Page 3 -navigate_forward-> Page 4
61 //
62 // Note that Page 2 is not visited on navigating backward/forward.
63
64 // Test case 1
65 std::wstring test_case_1 = L"history_length_test_page_1.html";
66 GURL url_1 = GetTestUrl(L"History", test_case_1);
67 NavigateToURL(url_1);
68 WaitForFinish("History_Length_Test_1", "1", url_1, kTestCompleteCookie,
69 kTestCompleteSuccess, action_max_timeout_ms());
70
71 // Test case 2
72 std::wstring test_case_2 = L"history_length_test_page_2.html";
73 GURL url_2 = GetTestUrl(L"History", test_case_2);
74 NavigateToURL(url_2);
75 WaitForFinish("History_Length_Test_2", "1", url_2, kTestCompleteCookie,
76 kTestCompleteSuccess, action_max_timeout_ms());
77
78 // Test case 3
79 std::wstring test_case_3 = L"history_length_test_page_4.html";
80 GURL url_3 = GetTestUrl(L"History", test_case_3);
81 NavigateToURL(url_3);
82 WaitForFinish("History_Length_Test_3", "1", url_3, kTestCompleteCookie,
56 kTestCompleteSuccess, action_max_timeout_ms()); 83 kTestCompleteSuccess, action_max_timeout_ms());
57 } 84 }
OLDNEW
« no previous file with comments | « chrome/test/data/History/history_length_test_page_4.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698