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

Side by Side Diff: content/browser/web_contents/navigation_entry_impl_unittest.cc

Issue 9999010: Store original request URL in NavigationEntry (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebasing Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string16.h" 5 #include "base/string16.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/browser/site_instance_impl.h" 8 #include "content/browser/site_instance_impl.h"
9 #include "content/browser/web_contents/navigation_entry_impl.h" 9 #include "content/browser/web_contents/navigation_entry_impl.h"
10 #include "content/public/common/ssl_status.h" 10 #include "content/public/common/ssl_status.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 EXPECT_FALSE(entry1_.get()->GetHasPostData()); 166 EXPECT_FALSE(entry1_.get()->GetHasPostData());
167 EXPECT_FALSE(entry2_.get()->GetHasPostData()); 167 EXPECT_FALSE(entry2_.get()->GetHasPostData());
168 entry2_.get()->SetHasPostData(true); 168 entry2_.get()->SetHasPostData(true);
169 EXPECT_TRUE(entry2_.get()->GetHasPostData()); 169 EXPECT_TRUE(entry2_.get()->GetHasPostData());
170 170
171 // Restored 171 // Restored
172 EXPECT_EQ(NavigationEntryImpl::RESTORE_NONE, entry1_->restore_type()); 172 EXPECT_EQ(NavigationEntryImpl::RESTORE_NONE, entry1_->restore_type());
173 EXPECT_EQ(NavigationEntryImpl::RESTORE_NONE, entry2_->restore_type()); 173 EXPECT_EQ(NavigationEntryImpl::RESTORE_NONE, entry2_->restore_type());
174 entry2_->set_restore_type(NavigationEntryImpl::RESTORE_LAST_SESSION); 174 entry2_->set_restore_type(NavigationEntryImpl::RESTORE_LAST_SESSION);
175 EXPECT_EQ(NavigationEntryImpl::RESTORE_LAST_SESSION, entry2_->restore_type()); 175 EXPECT_EQ(NavigationEntryImpl::RESTORE_LAST_SESSION, entry2_->restore_type());
176
177 // Original URL
178 EXPECT_EQ(GURL(), entry1_.get()->GetOriginalRequestURL());
179 EXPECT_EQ(GURL(), entry2_.get()->GetOriginalRequestURL());
180 entry2_.get()->SetOriginalRequestURL(GURL("original_url"));
181 EXPECT_EQ(GURL("original_url"), entry2_.get()->GetOriginalRequestURL());
176 } 182 }
177 183
178 } // namespace content 184 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/navigation_entry_impl.cc ('k') | content/public/browser/navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698