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

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

Issue 10170016: Add info about user agent overrides to WebContents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Forgot to initialize bool in constructor; win_rel caught it Created 8 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 176
177 // Original URL 177 // Original URL
178 EXPECT_EQ(GURL(), entry1_.get()->GetOriginalRequestURL()); 178 EXPECT_EQ(GURL(), entry1_.get()->GetOriginalRequestURL());
179 EXPECT_EQ(GURL(), entry2_.get()->GetOriginalRequestURL()); 179 EXPECT_EQ(GURL(), entry2_.get()->GetOriginalRequestURL());
180 entry2_.get()->SetOriginalRequestURL(GURL("original_url")); 180 entry2_.get()->SetOriginalRequestURL(GURL("original_url"));
181 EXPECT_EQ(GURL("original_url"), entry2_.get()->GetOriginalRequestURL()); 181 EXPECT_EQ(GURL("original_url"), entry2_.get()->GetOriginalRequestURL());
182
183 // User agent override
184 EXPECT_FALSE(entry1_.get()->GetIsOverridingUserAgent());
185 EXPECT_FALSE(entry2_.get()->GetIsOverridingUserAgent());
186 entry2_.get()->SetIsOverridingUserAgent(true);
187 EXPECT_TRUE(entry2_.get()->GetIsOverridingUserAgent());
182 } 188 }
183 189
184 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/navigation_entry_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698