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

Unified Diff: chrome/browser/sessions/session_service_unittest.cc

Issue 10855022: Remove the effects of --disable-restore-session-state. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Test update. Created 8 years, 4 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/browser/sessions/base_session_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service_unittest.cc
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index 282bca7904b72bd1712ffd5746769d2d9a5b9b2f..452b7aa1c97b38c41bab47529d9c3621c21de95b 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -769,44 +769,7 @@ TEST_F(SessionServiceTest, DontPersistDefault) {
EXPECT_EQ(ui::SHOW_STATE_NORMAL, windows[0]->show_state);
}
-TEST_F(SessionServiceTest, RemovePostData) {
- helper_.service()->save_post_data_ = false;
-
- SessionID tab_id;
- ASSERT_NE(window_id.id(), tab_id.id());
-
- std::string content_state("dummy_content_state");
- // Create a TabNavigation containing content_state and representing a POST
- // request.
- TabNavigation nav1(0, GURL("http://google.com"), content::Referrer(),
- ASCIIToUTF16("title"), content_state,
- content::PAGE_TRANSITION_QUALIFIER_MASK);
- nav1.set_type_mask(TabNavigation::HAS_POST_DATA);
-
- // Create a TabNavigation containing content_state and representing a normal
- // request.
- TabNavigation nav2(0, GURL("http://google.com/nopost"), content::Referrer(),
- ASCIIToUTF16("title"), content_state,
- content::PAGE_TRANSITION_QUALIFIER_MASK);
-
- helper_.PrepareTabInWindow(window_id, tab_id, 0, true);
- UpdateNavigation(window_id, tab_id, nav1, 0, true);
- UpdateNavigation(window_id, tab_id, nav2, 1, true);
-
- ScopedVector<SessionWindow> windows;
- ReadWindows(&(windows.get()));
-
- helper_.AssertSingleWindowWithSingleTab(windows.get(), 2);
-
- // Expected: the HTTP body was removed from the content state of the POST
- // navigation but the content state of the normal navigation is intact.
- EXPECT_NE(content_state, windows[0]->tabs[0]->navigations[0].state());
- helper_.AssertNavigationEquals(nav2, windows[0]->tabs[0]->navigations[1]);
-}
-
TEST_F(SessionServiceTest, KeepPostDataWithoutPasswords) {
- helper_.service()->save_post_data_ = true;
-
SessionID tab_id;
ASSERT_NE(window_id.id(), tab_id.id());
@@ -848,8 +811,6 @@ TEST_F(SessionServiceTest, KeepPostDataWithoutPasswords) {
}
TEST_F(SessionServiceTest, RemovePostDataWithPasswords) {
- helper_.service()->save_post_data_ = true;
-
SessionID tab_id;
ASSERT_NE(window_id.id(), tab_id.id());
« no previous file with comments | « chrome/browser/sessions/base_session_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698