diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-13 13:22:45 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-13 13:22:45 +0000 |
commit | 672eba29c169685bc6b08712098bed16a1eadc72 (patch) | |
tree | 6ecea5aa774ce1b8e6a31ec90417bc72f45f27d6 /chrome/test/ui | |
parent | d5282e72b2da0b27b2a487d8376c44ad795736dc (diff) | |
download | chromium_src-672eba29c169685bc6b08712098bed16a1eadc72.zip chromium_src-672eba29c169685bc6b08712098bed16a1eadc72.tar.gz chromium_src-672eba29c169685bc6b08712098bed16a1eadc72.tar.bz2 |
This is the successor to http://codereview.chromium.org/67150
Make forward/backward navigation work even when redirection is involved.
Currently, Chrome tries to go back to the page immediately before
the current one. This doesn't work if the current page was visited
by redirection; redirection just occurs again.
With this change, Chrome first tries to find the redirection source
of the current page and then to go back to the page before the source.
BUG=9663,10531
Tested: unit_tests, ui_tests, manually.
Patch contributed by Yuzo Fujishima <yuzo@google.com>
Review: http://codereview.chromium.org/100245
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15950 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r-- | chrome/test/ui/history_uitest.cc | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/chrome/test/ui/history_uitest.cc b/chrome/test/ui/history_uitest.cc index 25ee75e..11be6ff 100644 --- a/chrome/test/ui/history_uitest.cc +++ b/chrome/test/ui/history_uitest.cc @@ -49,9 +49,36 @@ class HistoryTester : public UITest { }; TEST_F(HistoryTester, VerifyHistoryLength) { - std::wstring test_case = L"history_length_test1.html"; - GURL url = GetTestUrl(L"History", test_case); - NavigateToURL(url); - WaitForFinish("History_Length_Test", "1", url, kTestCompleteCookie, + // Test the history length for the following page transitions. + // + // Test case 1: + // -open-> Page 1. + // Test case 2: + // -open-> Page 2 -redirect-> Page 3. + // Test case 3: + // -open-> Page 4 -navigate_backward-> Page 3 -navigate_backward->Page 1 + // -navigate_forward-> Page 3 -navigate_forward-> Page 4 + // + // Note that Page 2 is not visited on navigating backward/forward. + + // Test case 1 + std::wstring test_case_1 = L"history_length_test_page_1.html"; + GURL url_1 = GetTestUrl(L"History", test_case_1); + NavigateToURL(url_1); + WaitForFinish("History_Length_Test_1", "1", url_1, kTestCompleteCookie, + kTestCompleteSuccess, action_max_timeout_ms()); + + // Test case 2 + std::wstring test_case_2 = L"history_length_test_page_2.html"; + GURL url_2 = GetTestUrl(L"History", test_case_2); + NavigateToURL(url_2); + WaitForFinish("History_Length_Test_2", "1", url_2, kTestCompleteCookie, + kTestCompleteSuccess, action_max_timeout_ms()); + + // Test case 3 + std::wstring test_case_3 = L"history_length_test_page_4.html"; + GURL url_3 = GetTestUrl(L"History", test_case_3); + NavigateToURL(url_3); + WaitForFinish("History_Length_Test_3", "1", url_3, kTestCompleteCookie, kTestCompleteSuccess, action_max_timeout_ms()); } |