diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 20:14:29 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 20:14:29 +0000 |
commit | b9e2ecab97a8a7f3cce06951ab92a3eaef559206 (patch) | |
tree | 2ca050d7bb2742e5bada2d1cb508ddd5c7cf8144 /chrome/browser/session_history_uitest.cc | |
parent | c80950afb7ee003c3e069b80c3dd717a455ff685 (diff) | |
download | chromium_src-b9e2ecab97a8a7f3cce06951ab92a3eaef559206.zip chromium_src-b9e2ecab97a8a7f3cce06951ab92a3eaef559206.tar.gz chromium_src-b9e2ecab97a8a7f3cce06951ab92a3eaef559206.tar.bz2 |
Do not discount a MANUAL_SUBFRAME load just because it involved
some redirects.
R=brettw
BUG=21353
TEST=none
Review URL: http://codereview.chromium.org/246073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27887 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/session_history_uitest.cc')
-rw-r--r-- | chrome/browser/session_history_uitest.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc index 8d76583..473dc8b 100644 --- a/chrome/browser/session_history_uitest.cc +++ b/chrome/browser/session_history_uitest.cc @@ -23,10 +23,6 @@ const wchar_t kDocRoot[] = L"chrome/test/data"; class SessionHistoryTest : public UITest { protected: SessionHistoryTest() : UITest() { - FilePath path(test_data_directory_); - path = path.AppendASCII("session_history"); - - url_prefix_ = UTF8ToWide(net::FilePathToFileURL(path).spec()); } virtual void SetUp() { @@ -98,7 +94,6 @@ class SessionHistoryTest : public UITest { } protected: - wstring url_prefix_; scoped_refptr<BrowserProxy> window_; scoped_refptr<TabProxy> tab_; }; @@ -518,4 +513,21 @@ TEST_F(SessionHistoryTest, HistorySearchXSS) { EXPECT_EQ(L"History", GetTabTitle()); } +TEST_F(SessionHistoryTest, LocationChangeInSubframe) { + scoped_refptr<HTTPTestServer> server = + HTTPTestServer::CreateServer(kDocRoot, NULL); + ASSERT_TRUE(server.get()); + + ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage( + "files/session_history/location_redirect.html"))); + EXPECT_EQ(L"Default Title", GetTabTitle()); + + ASSERT_TRUE(tab_->NavigateToURL(GURL( + "javascript:void(frames[0].navigate())"))); + EXPECT_EQ(L"foo", GetTabTitle()); + + ASSERT_TRUE(tab_->GoBack()); + EXPECT_EQ(L"Default Title", GetTabTitle()); +} + } // namespace |